-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
278 lines (248 loc) · 7.58 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# .goreleaser.yaml
version: 2
builds:
# You can have multiple builds defined as a yaml list
- #
# ID of the build.
#
# Default: Project directory name.
#id: "my-build"
# Path to main.go file or main package.
# Notice: when used with `gomod.proxy`, this must be a package.
#
# Default: `.`.
#main: ./cmd/my-app
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
#
# Default: Project directory name.
#binary: program
# Custom flags.
#
# Templates: allowed.
#flags:
# - -tags=dev
# - -v
# Custom asmflags.
#
# Templates: allowed.
#asmflags:
# - -D mysymbol
# - all=-trimpath={{.Env.GOPATH}}
# Custom gcflags.
#
# Templates: allowed.
#gcflags:
# - all=-trimpath={{.Env.GOPATH}}
# - ./dontoptimizeme=-N
# Custom ldflags.
#
# Default: '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser'.
# Templates: allowed.
ldflags:
# taken from pq/Makefile
- -X github.com/rgolangh/pq/internal/version.Version={{.Version}}
- -X github.com/rgolangh/pq/internal/version.Commit={{.Commit}}
- -X github.com/rgolangh/pq/internal/version.CommitDate={{.Date}}
# Custom Go build mode.
#
# Valid options:
# - `c-shared`
# - `c-archive`
# - `pie`
#buildmode: c-shared
# Custom build tags templates.
#tags:
# - osusergo
# - netgo
# - static_build
# - feature
# Custom environment variables to be set during the builds.
# Invalid environment variables will be ignored.
#
# Default: os.Environ() ++ env config section.
# Templates: allowed.
#env:
# - CGO_ENABLED=0
# # complex, templated envs (v1.14+):
# - >-
# {{- if eq .Os "darwin" }}
# {{- if eq .Arch "amd64"}}CC=o64-clang{{- end }}
# {{- if eq .Arch "arm64"}}CC=aarch64-apple-darwin20.2-clang{{- end }}
# {{- end }}
# {{- if eq .Os "windows" }}
# {{- if eq .Arch "amd64" }}CC=x86_64-w64-mingw32-gcc{{- end }}
# {{- end }}
# GOOS list to build for.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'darwin', 'linux', 'windows' ].
goos:
- linux
# - freebsd
# - windows
# GOARCH to build for.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ '386', 'amd64', 'arm64' ].
#goarch:
# - amd64
# - arm
# - arm64
# GOARM to build for when GOARCH is arm.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 6 ].
#goarm:
# - 6
# - 7
# GOAMD64 to build when GOARCH is amd64.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'v1' ].
goamd64:
- v2
- v3
# GOARM64 to build when GOARCH is arm64.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'v8.0' ].
#goarm64:
# - v9.0
# GOMIPS and GOMIPS64 to build when GOARCH is mips, mips64, mipsle or mips64le.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'hardfloat' ].
gomips:
- hardfloat
- softfloat
# GO386 to build when GOARCH is 386.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'sse2' ].
#go386:
# - sse2
# - softfloat
# GOPPC64 to build when GOARCH is PPC64.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'power8' ].
#goppc64:
# - power8
# - power9
# GORISCV64 to build when GOARCH is RISCV64.
# For more info refer to: https://go.dev/doc/install/source#environment
#
# Default: [ 'rva20u64' ].
#goriscv64:
# - rva22u64
# List of combinations of GOOS + GOARCH + GOARM to ignore.
#ignore:
# - goos: darwin
# goarch: 386
# - goos: linux
# goarch: arm
# goarm: 7
# - goarm: mips64
# - gomips: hardfloat
# - goamd64: v4
# Optionally override the matrix generation and specify only the final list
# of targets.
#
# Format is `{goos}_{goarch}` with their respective suffixes when
# applicable: `_{goarm}`, `_{goamd64}`, `_{gomips}`.
#
# Special values:
# - go_118_first_class: evaluates to the first-class ports of go1.18.
# - go_first_class: evaluates to latest stable go first-class ports,
# currently same as 1.18.
#
# This overrides `goos`, `goarch`, `goarm`, `gomips`, `goamd64` and
# `ignores`.
#targets:
# - go_first_class
# - go_118_first_class
# - linux_amd64_v1
# - darwin_arm64
# - linux_arm_6
# Set a specific go binary to use when building.
# It is safe to ignore this option in most cases.
#
# Default: "go".
# Templates: allowed.
#gobinary: "go1.23"
# Sets the command to run to build.
# Can be useful if you want to build tests, for example,
# in which case you can set this to "test".
# It is safe to ignore this option in most cases.
#
# Default: build.
#command: test
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible.
# Pass an empty string to skip modifying the output.
#
# Templates: allowed.
#mod_timestamp: "{{ .CommitTimestamp }}"
# Hooks can be used to customize the final binary,
# for example, to run generators.
#
# Templates: allowed.
#hooks:
# pre: rice embed-go
# post: ./script.sh {{ .Path }}
# If true, skip the build.
# Useful for library projects.
#
# Templates: allowed (since v2.3).
#skip: false
# By default, GoReleaser will create your binaries inside
# `dist/${BuildID}_${BuildTarget}`, which is a unique directory per build
# target in the matrix.
# You can set subdirs within that directory using the `binary` property.
#
# However, if for some reason you don't want that unique directory to be
# created, you can set this property.
# If you do, you are responsible for keeping different builds from
# overriding each other.
#
# Templates: allowed (since v2.3).
#no_unique_dist_dir: true
# By default, GoReleaser will check if the main filepath has a main
# function.
# This can be used to skip that check, in case you're building tests, for
# example.
#no_main_check: true
# Path to project's (sub)directory containing Go code.
# This is the working directory for the Go build command(s).
# If dir does not contain a `go.mod` file, and you are using `gomod.proxy`,
# produced binaries will be invalid.
# You would likely want to use `main` instead of this.
#
# Default: '.'.
#dir: go
# Builder allows you to use a different build implementation.
# This is a GoReleaser Pro feature.
# Valid options are: `go` and `prebuilt`.
#
# Default: 'go'.
#builder: prebuilt
# Overrides allows to override some fields for specific targets.
# This can be specially useful when using CGO.
# Note: it'll only match if the full target matches.
#overrides:
# - goos: darwin
# goarch: amd64
# goamd64: v1 # Note: if you leave this
# goarm: ""
# gomips: ""
# ldflags:
# - foo
# tags:
# - bar
# asmflags:
# - foobar
# gcflags:
# - foobaz
# env:
# - CGO_ENABLED=1