answer/.goreleaser.yaml

59 lines
1.3 KiB
YAML
Raw Normal View History

2022-12-16 18:41:07 +08:00
env:
- GO11MODULE=on
- GO111MODULE=on
- GOPROXY=https://goproxy.io,direct
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
2023-02-08 14:14:11 +08:00
release:
draft: true
2022-12-16 13:24:45 +08:00
builds:
2023-02-08 14:14:11 +08:00
- id: build
2022-12-16 17:08:56 +08:00
main: ./cmd/answer/.
2022-12-16 17:16:27 +08:00
binary: answer
ldflags: -s -w -X github.com/answerdev/answer/cmd.Version={{.Version}} -X github.com/answerdev/answer/cmd.Revision={{.ShortCommit}} -X github.com/answerdev/answer/cmd.Time={{.Date}} -X github.com/answerdev/answer/cmd.BuildUser=goreleaser
2023-02-08 14:14:11 +08:00
flags: -v
2022-12-16 17:08:56 +08:00
goos:
- linux
2023-02-08 14:14:11 +08:00
- darwin
2022-12-16 17:08:56 +08:00
goarch:
- amd64
2023-01-16 16:28:21 +08:00
- arm64
2023-02-08 14:14:11 +08:00
- id: build-windows
2022-12-16 22:54:12 +08:00
main: ./cmd/answer/.
binary: answer
ldflags: -s -w -X github.com/answerdev/answer/cmd.Version={{.Version}} -X github.com/answerdev/answer/cmd.Revision={{.ShortCommit}} -X github.com/answerdev/answer/cmd.Time={{.Date}} -X github.com/answerdev/answer/cmd.BuildUser=goreleaser
2022-12-16 22:54:12 +08:00
flags: -v
goos:
2023-02-08 14:14:11 +08:00
- windows
2022-12-16 22:54:12 +08:00
goarch:
- amd64
2023-02-08 14:14:11 +08:00
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:
- name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
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
2023-02-08 14:14:11 +08:00