-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
218 lines (193 loc) · 6.25 KB
/
.goreleaser.yml
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
# .goreleaser.yaml
builds:
# You can have multiple builds defined as a yaml list
-
# ID of the build.
# Defaults to the binary name.
# id: "my-build"
# Path to main.go file or main package.
# Notice: when used with `gomod.proxy`, this must be a package.
#
# Default is `.`.
# main: ./cmd/my-app
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
# binary: program
# Custom flags templates.
# Default is empty.
# flags:
# - -tags=dev
# - -v
# Custom asmflags templates.
# Default is empty.
# asmflags:
# - -D mysymbol
# - all=-trimpath={{.Env.GOPATH}}
# Custom gcflags templates.
# Default is empty.
# gcflags:
# - all=-trimpath={{.Env.GOPATH}}
# - ./dontoptimizeme=-N
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- "-X lit/cmd.Version={{.Version}}"
# Custom build tags templates.
# Default is empty.
# tags:
# - osusergo
# - netgo
# - static_build
# - feature
# Custom environment variables to be set during the builds.
#
# Default: `os.Environ()` merged with what you set the root `env` section.
# env:
# - CGO_ENABLED=0
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
# goos:
# - freebsd
# - windows
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386, amd64 and arm64.
# goarch:
# - amd64
# - arm
# - arm64
# GOARM to build for when GOARCH is arm.
# For more info refer to: https://golang.org/doc/install/source#environment
# Default is only 6.
# goarm:
# - 6
# - 7
# GOAMD64 to build when GOARCH is amd64.
# For more info refer to: https://golang.org/doc/install/source#environment
# Default is only v1.
# goamd64:
# - v2
# - v3
# GOMIPS and GOMIPS64 to build when GOARCH is mips, mips64, mipsle or mips64le.
# For more info refer to: https://golang.org/doc/install/source#environment
# Default is only hardfloat.
# gomips:
# - hardfloat
# - softfloat
# List of combinations of GOOS + GOARCH + GOARM to ignore.
# Default is empty.
# 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.
# Since GoReleaser v1.9.
# - go_first_class: evaluates to latest stable go first-class ports,
# currently same as 1.18.
# Since GoReleaser v1.9.
#
# 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 is "go"
# gobinary: "go1.13.4"
# 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.
# Since: v1.9.
# command: test
# Set the modified timestamp on the output binary, typically
# you would do this to ensure a build was reproducible. Pass
# empty string to skip modifying the output.
# Default is empty string.
# mod_timestamp: '{{ .CommitTimestamp }}'
# Hooks can be used to customize the final binary,
# for example, to run generators.
# Those fields allow templates.
# Default is both hooks empty.
# hooks:
# pre: rice embed-go
# post: ./script.sh {{ .Path }}
# If true, skip the build.
# Useful for library projects.
# Default is false
# skip: false
# By default, GoReleaser will create your binaries inside
# `dist/${BuildID}_${BuildTarget}`, which is an unique directory per build
# target in the matrix.
# You can set subdirs within that folder 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.
#
# Defaults to `false`.
# 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.
#
# Default: false.
# Since: v1.9.
# 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 is `.`.
# dir: go
# Builder allows you to use a different build implementation.
# This is a GoReleaser Pro feature.
# Valid options are: `go` and `prebuilt`.
# Defaults to `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.
#
# Default: empty.
# Since: v1.5.
# overrides:
# - goos: darwin
# goarch: arm64
# goamd64: v1
# goarm: ''
# gomips: ''
# ldflags:
# - foo
# tags:
# - bar
# asmflags:
# - foobar
# gcflags:
# - foobaz
# env:
# - CGO_ENABLED=1