Skip to content

Commit

Permalink
TECH Update GoReleaser config for the new version
Browse files Browse the repository at this point in the history
  • Loading branch information
sibprogrammer committed Oct 11, 2023
1 parent 7df65db commit 4024a31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 8 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ builds:
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}
archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
replacements:
darwin: mac
linux: linux
windows: win
amd64: x86_64
- name_template: >-
{{- .ProjectName }}-
{{- .Version }}-
{{- if eq .Os "darwin" }}mac
{{- else if eq .Os "windows" }}win
{{- else }}{{ .Os }}{{ end }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
format: tar.gz
format_overrides:
- goos: windows
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build: test
go build -ldflags "$(LDFLAGS)"

release: test
goreleaser release --rm-dist
goreleaser release --clean

run:
go run main.go
Expand Down

0 comments on commit 4024a31

Please sign in to comment.