Skip to content

Commit 83d272f

Browse files
fix: go releaser (#392)
Co-authored-by: Rodrigo Brito <[email protected]>
1 parent 2cd4ffc commit 83d272f

File tree

2 files changed

+33
-16
lines changed

2 files changed

+33
-16
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
1919

2020
- name: Set up Go
21-
uses: actions/setup-go@v3
21+
uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.18
23+
go-version: '1.23'
2424

2525
- name: Run GoReleaser
26-
uses: goreleaser/goreleaser-action@v3
26+
uses: goreleaser/goreleaser-action@v6
2727
with:
28-
version: latest
29-
args: release --rm-dist
28+
version: '~> v2'
29+
args: release --clean
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# GoReleaser v2 configuration
2+
version: 2
3+
14
before:
25
hooks:
36
- go mod tidy
@@ -12,24 +15,38 @@ builds:
1215
- linux
1316
- darwin
1417
- windows
18+
goarch:
19+
- amd64
20+
- arm64
21+
# Ignore arm64 on Windows (not commonly supported)
22+
ignore:
23+
- goos: windows
24+
goarch: arm64
1525

1626
archives:
17-
- replacements:
18-
darwin: Darwin
19-
linux: Linux
20-
windows: Windows
21-
386: i386
22-
amd64: x86_64
23-
format: zip
27+
- format: tar.gz
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+
format_overrides:
36+
- goos: windows
37+
format: zip
2438

2539
checksum:
2640
name_template: 'checksums.txt'
2741

2842
snapshot:
29-
name_template: "{{ .Tag }}"
43+
version_template: "{{ incpatch .Version }}-next"
3044

3145
changelog:
46+
sort: asc
3247
filters:
3348
exclude:
34-
- '^docs\('
35-
- '^test\('
49+
- '^docs:'
50+
- '^test:'
51+
- '^chore:'
52+
- 'typo'

0 commit comments

Comments
 (0)