# This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com version: 2 before: hooks: # You may remove this if you don't use go modules. - go mod download # you may remove this if you don't need go generate - go generate ./... builds: - env: - CGO_ENABLED=0 flags: - -trimpath goos: - android - linux - windows - darwin - freebsd goarch: - '386' - amd64 - arm - arm64 - mips - mipsle - mips64 - mips64le goarm: - '5' - '6' - '7' gomips: - hardfloat - softfloat ignore: # we only need the arm64 build on android - goos: android goarch: arm - goos: android goarch: '386' - goos: android goarch: amd64 ldflags: - -s -w -X main.version={{.Tag}} -X main.buildTime={{.Date}} archives: # use zip for windows archives - format_overrides: - goos: windows format: zip # this name template makes the OS and Arch compatible with the results of uname. name_template: >- {{ .ProjectName }}_ {{- .Version }}_ {{- .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} {{- if .Mips }}_{{ .Mips }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }} checksum: name_template: 'checksums.txt' snapshot: name_template: '{{ .Tag }}-next' changelog: sort: asc filters: exclude: - '^docs:' - '^test:'