Skip to content

Commit

Permalink
update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoConstantine committed Jul 3, 2024
1 parent 8a2aec5 commit d874aea
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,52 @@
version: 2

before:
hooks:
- go mod tidy

builds:
- binary: mycli
env:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w -X main.version={{.Version}} -X main.buildDate={{.Date}}
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}

archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- .Os }}_
{{- .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
format_overrides:
- goos: windows
format: zip

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^ci:"
- "^chore:"

release:
github:
owner: XiaoConstantine
name: mycli
prerelease: auto

0 comments on commit d874aea

Please sign in to comment.