Skip to content

Commit baa5319

Browse files
authored
chore(ci): bump goreleaser and build more archs (#215)
Bump goreleaser to 2.x and build packages for more archs, namely Darwin ARMv8. See #201.
1 parent 3c61f67 commit baa5319

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
echo "${DOCKERHUB_TOKEN}" | docker login --username "${DOCKERHUB_USERNAME}" --password-stdin
3232
-
3333
name: Run GoReleaser
34-
uses: goreleaser/goreleaser-action@v2
34+
uses: goreleaser/goreleaser-action@v6
3535
with:
36-
version: v1.5.0
37-
args: release --rm-dist
36+
version: v2.10.2
37+
args: release --clean
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# This is an example goreleaser.yaml file with some sane defaults.
22
# Make sure to check the documentation at http://goreleaser.com
3+
version: 2
4+
35
before:
46
hooks:
57
# You may remove this if you don't use go modules.
@@ -20,21 +22,25 @@ builds:
2022
- darwin
2123
- windows
2224

23-
# https://github.com/italia/publiccode-parser-go/issues/50
24-
ignore:
25-
- goos: darwin
26-
goarch: 386
2725
archives:
28-
- replacements:
29-
darwin: Darwin
30-
linux: Linux
31-
windows: Windows
32-
386: i386
33-
amd64: x86_64
26+
- formats: [tar.gz]
27+
# this name template makes the OS and Arch compatible with the results of `uname`.
28+
name_template: >-
29+
{{ .ProjectName }}_
30+
{{- title .Os }}_
31+
{{- if eq .Arch "amd64" }}x86_64
32+
{{- else if eq .Arch "386" }}i386
33+
{{- else }}{{ .Arch }}{{ end }}
34+
{{- if .Arm }}v{{ .Arm }}{{ end }}
35+
# use zip for windows archives
36+
format_overrides:
37+
- goos: windows
38+
formats: [zip]
39+
3440
checksum:
3541
name_template: 'checksums.txt'
3642
snapshot:
37-
name_template: "{{ .Tag }}-next"
43+
version_template: "{{ .Tag }}-next"
3844
changelog:
3945
sort: asc
4046
filters:

0 commit comments

Comments
 (0)