diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d892b6c..1d8fa7d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,9 +1,14 @@ # This is an example .goreleaser.yml file with some sensible defaults. # Make sure to check the documentation at https://goreleaser.com + + +version: 1 + before: hooks: # You may remove this if you don't use go modules. - go mod tidy + builds: - env: - CGO_ENABLED=0 @@ -12,17 +17,26 @@ builds: - windows - darwin ldflags: - - -s -w -X github.com/harakeishi/curver.Version={{.Version}} + - -s -w -X github.com/harakeishi/curver.Version={{.Version}} + archives: - - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' \ No newline at end of file + - "^docs:" + - "^test:"