Skip to content

Commit 4024a31

Browse files
committed
TECH Update GoReleaser config for the new version
1 parent 7df65db commit 4024a31

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
with:
2323
distribution: goreleaser
2424
version: latest
25-
args: release --rm-dist
25+
args: release --clean
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ builds:
2020
ldflags:
2121
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
2222
archives:
23-
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
24-
replacements:
25-
darwin: mac
26-
linux: linux
27-
windows: win
28-
amd64: x86_64
23+
- name_template: >-
24+
{{- .ProjectName }}-
25+
{{- .Version }}-
26+
{{- if eq .Os "darwin" }}mac
27+
{{- else if eq .Os "windows" }}win
28+
{{- else }}{{ .Os }}{{ end }}-
29+
{{- if eq .Arch "amd64" }}x86_64
30+
{{- else }}{{ .Arch }}{{ end }}
2931
format: tar.gz
3032
format_overrides:
3133
- goos: windows

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build: test
1313
go build -ldflags "$(LDFLAGS)"
1414

1515
release: test
16-
goreleaser release --rm-dist
16+
goreleaser release --clean
1717

1818
run:
1919
go run main.go

0 commit comments

Comments
 (0)