Skip to content

Commit 8ab8fe6

Browse files
authored
enha: upgrade goreleaser to 1.21 (#298)
1 parent 1b3bc9b commit 8ab8fe6

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ jobs:
4949
- uses: goreleaser/goreleaser-action@v2
5050
if: success() && startsWith(github.ref, 'refs/tags/')
5151
with:
52-
version: latest
52+
version: "~> 1.21"
5353
distribution: goreleaser
54-
args: release --rm-dist
54+
args: release --clean
5555
env:
5656
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,28 @@ builds:
3434

3535
archives:
3636
- id: archives
37-
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
37+
name_template: >-
38+
{{ .ProjectName }}_{{ .Version }}_
39+
{{- title .Os }}_
40+
{{- if eq .Arch "amd64" }}x86_64
41+
{{- else if eq .Arch "386" }}i386
42+
{{- else }}{{ .Arch }}{{ end }}
43+
{{- if .Arm }}v{{ .Arm }}{{ end }}
3844
wrap_in_directory: true
39-
replacements:
40-
darwin: Darwin
41-
linux: Linux
42-
windows: Windows
43-
386: i386
44-
amd64: x86_64
4545
files:
4646
- none* # https://goreleaser.com/customization/archive/?h=archives#packaging-only-the-binaries
4747
format_overrides:
4848
- goos: windows
4949
format: zip
5050
- id: binary
51-
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
51+
name_template: >-
52+
{{ .ProjectName }}_{{ .Version }}_
53+
{{- title .Os }}_
54+
{{- if eq .Arch "amd64" }}x86_64
55+
{{- else if eq .Arch "386" }}i386
56+
{{- else }}{{ .Arch }}{{ end }}
57+
{{- if .Arm }}v{{ .Arm }}{{ end }}
5258
format: binary
53-
replacements:
54-
darwin: Darwin
55-
linux: Linux
56-
windows: Windows
57-
386: i386
58-
amd64: x86_64
5959
files:
6060
- none* # https://goreleaser.com/customization/archive/?h=archives#packaging-only-the-binaries
6161

0 commit comments

Comments
 (0)