.goreleaser.yaml (view raw)
1version: 2
2
3builds:
4 - main: ./...
5 env:
6 - CGO_ENABLED=0
7 goos:
8 - linux
9 - windows
10 - darwin
11 goarch:
12 - arm64
13 - amd64
14 - "386"
15 dir: cmd
16
17archives:
18 - formats: [tar.gz]
19 # this name template makes the OS and Arch compatible with the results of `uname`.
20 name_template: >-
21 {{ .ProjectName }}_
22 {{- title .Os }}_
23 {{- if eq .Arch "amd64" }}x86_64
24 {{- else if eq .Arch "386" }}i386
25 {{- else }}{{ .Arch }}{{ end }}
26 {{- if .Arm }}v{{ .Arm }}{{ end }}
27 # use zip for windows archives
28 format_overrides:
29 - goos: windows
30 formats: [zip]
31
32changelog:
33 sort: asc
34 filters:
35 exclude:
36 - "^docs:"
37 - "^test:"
38
39upx:
40 - # Templates: allowed.
41 enabled: true
42
43 # Filter by build ID.
44 ids: [build1, build2]
45
46 # Filter by GOOS.
47 goos: [linux, darwin]
48
49 # Filter by GOARCH.
50 goarch: [arm, amd64]
51
52 # Filter by GOARM.
53 goarm: [8]
54
55 # Filter by GOAMD64.
56 goamd64: [v1]
57
58 # Compress argument.
59 # Valid options are from '1' (faster) to '9' (better), and 'best'.
60 compress: best
61
62 # Whether to try LZMA (slower).
63 lzma: true
64
65 # Whether to try all methods and filters (slow).
66 brute: true