1- # This is an example .goreleaser.yml file with some sensible defaults.
2- # Make sure to check the documentation at https://goreleaser.com
1+ version : 2
2+
33before :
44 hooks :
5- # You may remove this if you don't use go modules.
65 - go mod tidy
6+
77builds :
8- - env :
9- - >-
10- {{- if or (eq .Os "darwin") (eq .Os "linux") }}
11- CGO_ENABLED=1
12- {{- else }}
13- CGO_ENABLED=0
14- {{- end }}
8+ - id : macos
9+ goos :
10+ - darwin
11+ goarch :
12+ - amd64
13+ - arm64
14+ env :
15+ - CGO_ENABLED=1
16+ # Cross compile settings are disabled as MacOS builds can currently only
17+ # be built natively
18+ # - >-
19+ # {{- if eq .Arch "amd64" }}CC=o64-clang
20+ # {{- else }}CC=oa64-clang
21+ # {{ end }}
22+ # - >-
23+ # {{- if eq .Arch "amd64" }}CCX=o64-clang++
24+ # {{- else }}CCX=oa64-clang++
25+ # {{ end }}
26+ flags :
27+ - -trimpath
28+
29+ - id : linux
1530 goos :
1631 - linux
32+ goarch :
33+ - amd64
34+ - arm64
35+ env :
36+ - CGO_ENABLED=1
37+ - >-
38+ {{- if eq .Arch "amd64" }}CC=x86_64-linux-gnu-gcc
39+ {{- else }}CC=aarch64-linux-gnu-gcc
40+ {{ end }}
41+ - >-
42+ {{- if eq .Arch "amd64" }}CCX=x86_64-linux-gnu-g++
43+ {{- else }}CCX=aarch64-linux-gnu-g++
44+ {{ end }}
45+ flags :
46+ - -trimpath
47+
48+ - id : windows
49+ goos :
1750 - windows
18- - darwin
51+ goarch :
52+ - amd64
53+ - 386
54+ env :
55+ - CGO_ENABLED=0
1956 flags :
2057 - -trimpath
2158
2259archives :
2360 - format : tar.gz
24- # this name template makes the OS and Arch compatible with the results of uname.
2561 name_template : >-
2662 {{ .ProjectName }}_
2763 {{- .Version }}_
@@ -30,22 +66,19 @@ archives:
3066 {{- else if eq .Arch "386" }}i386
3167 {{- else }}{{ .Arch }}{{ end }}
3268 {{- if .Arm }}v{{ .Arm }}{{ end }}
33- # use zip for windows archives
3469 format_overrides :
3570 - goos : windows
3671 format : zip
72+
3773checksum :
3874 name_template : ' checksums.txt'
75+
3976snapshot :
4077 name_template : " {{ incpatch .Version }}-next"
78+
4179changelog :
4280 sort : asc
4381 filters :
4482 exclude :
4583 - ' ^docs:'
4684 - ' ^test:'
47-
48- # The lines beneath this are called `modelines`. See `:help modeline`
49- # Feel free to remove those if you don't want/use them.
50- # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
51- # vim: set ts=2 sw=2 tw=0 fo=cnqoj
0 commit comments