answer/.goreleaser.yaml

73 lines
1.7 KiB
YAML
Raw Normal View History

2022-12-16 18:41:07 +08:00
env:
- GO11MODULE=on
- GO111MODULE=on
- GOPROXY=https://goproxy.io
2023-01-16 17:00:56 +08:00
- CGO_ENABLED=0
2022-12-16 18:41:07 +08:00
2022-12-16 13:24:45 +08:00
before:
hooks:
- go mod tidy
builds:
2022-12-16 17:16:27 +08:00
- id: build-amd64
2022-12-16 17:08:56 +08:00
main: ./cmd/answer/.
2022-12-16 17:16:27 +08:00
binary: answer
2022-12-16 17:27:41 +08:00
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
2022-12-16 17:08:56 +08:00
goos:
- linux
goarch:
- amd64
- id: build-windows
main: ./cmd/answer/.
2022-12-16 17:16:27 +08:00
binary: answer
2022-12-16 17:27:41 +08:00
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
2022-12-16 17:08:56 +08:00
goos:
- windows
goarch:
- amd64
2022-12-16 17:16:27 +08:00
- id: build-arm64
2022-12-16 17:08:56 +08:00
main: ./cmd/answer/.
2022-12-16 17:16:27 +08:00
binary: answer
2022-12-16 17:27:41 +08:00
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
2022-12-16 13:24:45 +08:00
goos:
- linux
2022-12-16 17:08:56 +08:00
goarch:
2023-01-16 16:28:21 +08:00
- arm64
2022-12-16 22:54:12 +08:00
- id: build-darwin-arm64
main: ./cmd/answer/.
binary: answer
goos:
- darwin
goarch:
- arm64
2023-01-16 16:28:21 +08:00
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
2022-12-16 22:54:12 +08:00
flags: -v
- id: build-darwin-amd64
main: ./cmd/answer/.
binary: answer
goos:
- darwin
goarch:
- amd64
2023-01-16 16:28:21 +08:00
ldflags: -s -w -X main.Version={{.Version}} -X main.Revision={{.ShortCommit}} -X main.Time={{.Date}} -X main.BuildUser=goreleaser
2022-12-16 22:54:12 +08:00
flags: -v
2022-12-16 18:41:07 +08:00
2022-12-16 17:08:56 +08:00
2022-12-16 13:24:45 +08:00
archives:
- replacements:
2023-02-03 15:22:05 +08:00
darwin: macOS
2022-12-16 13:24:45 +08:00
amd64: x86_64
2023-02-03 15:22:05 +08:00
linux: Linux
windows: Windows
2022-12-16 13:24:45 +08:00
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
2022-12-16 17:16:27 +08:00
- '^test:'
2023-01-16 16:28:21 +08:00
# goreleaser release --snapshot --rm-dist