forked from TheThingsNetwork/lorawan-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.release.yml
302 lines (290 loc) · 9.76 KB
/
.goreleaser.release.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
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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
project_name: lorawan-stack
release:
prerelease: auto
builds:
- id: stack
main: ./cmd/ttn-lw-stack
binary: ttn-lw-stack
ldflags:
- -s
- -w
- -X go.thethings.network/lorawan-stack/v3/pkg/version.BuildDate={{.Date}}
- -X go.thethings.network/lorawan-stack/v3/pkg/version.GitCommit={{.ShortCommit}}
- -X go.thethings.network/lorawan-stack/v3/pkg/version.TTN={{.Version}}
env:
- CGO_ENABLED=0
goos: [darwin, linux, windows]
goarch: [386, amd64, arm, arm64]
goarm: [6, 7]
ignore:
- { goos: darwin, goarch: 386 }
- { goos: windows, goarch: arm, goarm: 6 }
- { goos: windows, goarch: arm, goarm: 7 }
- id: cli
main: ./cmd/ttn-lw-cli
binary: ttn-lw-cli
ldflags:
- -s
- -w
- -X go.thethings.network/lorawan-stack/v3/pkg/version.BuildDate={{.Date}}
- -X go.thethings.network/lorawan-stack/v3/pkg/version.GitCommit={{.ShortCommit}}
- -X go.thethings.network/lorawan-stack/v3/pkg/version.TTN={{.Version}}
env:
- CGO_ENABLED=0
goos: [darwin, linux, windows]
goarch: [386, amd64, arm, arm64]
goarm: [6, 7]
ignore:
- { goos: darwin, goarch: 386 }
- { goos: windows, goarch: arm, goarm: 6 }
- { goos: windows, goarch: arm, goarm: 7 }
archives:
- id: stack
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
builds:
- cli
- stack
files:
- LICENSE
- README.md
- public/**
- config/completion/*/*
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
- id: cli
name_template: '{{ .ProjectName }}-cli_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
builds:
- cli
files:
- LICENSE
- README.md
- config/completion/*/*ttn-lw-cli*
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
nfpms:
- id: stack
builds:
- cli
- stack
vendor: The Things Network
homepage: https://www.thethingsnetwork.org
maintainer: The Things Network Foundation <[email protected]>
description: The Things Stack for LoRaWAN
license: Apache 2.0
formats:
- deb
- rpm
recommends:
- redis
- postgresql
contents:
- src: 'public/**'
dst: '/srv/ttn-lorawan/public'
- src: 'config/completion/bash/*'
dst: '/usr/share/bash-completion/completions'
- src: 'config/completion/fish/*'
dst: '/usr/share/fish/vendor_completions.d'
- src: 'config/completion/zsh/*'
dst: '/usr/share/zsh/vendor-completions'
snapcrafts:
- id: stack
builds:
- cli
- stack
name: ttn-lw-stack
summary: The Things Stack for LoRaWAN
description: The Things Stack for LoRaWAN
grade: stable
confinement: strict
publish: true
extra_files:
- source: config/snap/ttn-lw-stack.wrapper
destination: ttn-lw-stack.wrapper
mode: 0755
- source: config/snap/ttn-lw-cli.wrapper
destination: ttn-lw-cli.wrapper
mode: 0755
apps:
ttn-lw-stack:
plugs: [home, network, network-bind]
command: ttn-lw-stack.wrapper
completer: config/completion/bash/ttn-lw-stack
environment:
XDG_CACHE_HOME: $SNAP_USER_COMMON
ttn-lw-cli:
plugs: [home, network, network-bind]
command: ttn-lw-cli.wrapper
completer: config/completion/bash/ttn-lw-cli-snap
environment:
XDG_CACHE_HOME: $SNAP_USER_COMMON
brews:
- name: ttn-lw-stack
ids:
- stack
tap:
owner: TheThingsNetwork
name: homebrew-lorawan-stack
commit_author:
name: ttn-ci
email: [email protected]
homepage: https://www.thethingsnetwork.org
description: The Things Stack for LoRaWAN
conflicts:
- ttn-lw-cli
skip_upload: auto
install: |
bin.install "ttn-lw-cli"
libexec.install %w[ttn-lw-stack public]
env = {
:TTN_LW_HTTP_STATIC_SEARCH_PATH => libexec/"public"
}
(bin/"ttn-lw-stack").write_env_script libexec/"ttn-lw-stack", env
bash_completion.install "config/completion/bash/ttn-lw-cli"
zsh_completion.install "config/completion/zsh/_ttn-lw-cli"
fish_completion.install "config/completion/fish/ttn-lw-cli.fish"
bash_completion.install "config/completion/bash/ttn-lw-stack"
zsh_completion.install "config/completion/zsh/_ttn-lw-stack"
fish_completion.install "config/completion/fish/ttn-lw-stack.fish"
- name: ttn-lw-cli
ids:
- cli
tap:
owner: TheThingsNetwork
name: homebrew-lorawan-stack
commit_author:
name: ttn-ci
email: [email protected]
homepage: https://www.thethingsnetwork.org
description: CLI of The Things Stack for LoRaWAN
conflicts:
- ttn-lw-stack
skip_upload: auto
install: |
bin.install "ttn-lw-cli"
bash_completion.install "config/completion/bash/ttn-lw-cli"
zsh_completion.install "config/completion/zsh/_ttn-lw-cli"
fish_completion.install "config/completion/fish/ttn-lw-cli.fish"
blobs:
- provider: s3
# NOTE: GoReleaser documentation says that bucket is a template, but it's not.
bucket: the-things-stack-releases
ids:
- stack
- cli
folder: '{{ .Version }}'
extra_files:
- glob: ./CHANGELOG.md
dockers:
- goos: linux
goarch: amd64
dockerfile: Dockerfile
ids:
- cli
- stack
use: buildx
build_flag_templates:
- --platform=linux/amd64
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.vendor=The Things Network Foundation'
- '--label=org.opencontainers.image.title=The Things Stack'
- '--label=org.opencontainers.image.url=https://www.thethingsindustries.com/docs'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
image_templates:
- 'thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-amd64'
- 'thethingsnetwork/lorawan-stack:{{ .Version }}-amd64'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-amd64'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-amd64'
skip_push: false
extra_files:
- data
- public
- goos: linux
goarch: arm64
dockerfile: Dockerfile
ids:
- cli
- stack
use: buildx
build_flag_templates:
- --platform=linux/arm64/v8
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.vendor=The Things Network Foundation'
- '--label=org.opencontainers.image.title=The Things Stack'
- '--label=org.opencontainers.image.url=https://www.thethingsindustries.com/docs'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
image_templates:
- 'thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-arm64'
- 'thethingsnetwork/lorawan-stack:{{ .Version }}-arm64'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-arm64'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-arm64'
skip_push: false
extra_files:
- data
- public
- goos: linux
goarch: arm
goarm: 7
dockerfile: Dockerfile
ids:
- cli
- stack
use: buildx
build_flag_templates:
- --platform=linux/arm/v7
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.vendor=The Things Network Foundation'
- '--label=org.opencontainers.image.title=The Things Stack'
- '--label=org.opencontainers.image.url=https://www.thethingsindustries.com/docs'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
image_templates:
- 'thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-armv7'
- 'thethingsnetwork/lorawan-stack:{{ .Version }}-armv7'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-armv7'
- 'ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-armv7'
skip_push: false
extra_files:
- data
- public
docker_manifests:
- name_template: thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}
image_templates:
- thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-amd64
- thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-arm64
- thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-armv7
- name_template: thethingsnetwork/lorawan-stack:{{ .Version }}
image_templates:
- thethingsnetwork/lorawan-stack:{{ .Version }}-amd64
- thethingsnetwork/lorawan-stack:{{ .Version }}-arm64
- thethingsnetwork/lorawan-stack:{{ .Version }}-armv7
- name_template: ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}
image_templates:
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-amd64
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-arm64
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Major }}.{{ .Minor }}-armv7
- name_template: ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}
image_templates:
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-amd64
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-arm64
- ghcr.io/thethingsnetwork/lorawan-stack:{{ .Version }}-armv7
signs:
- artifacts: checksum
args:
- '--pinentry-mode=loopback'
- '--no-tty'
- '--passphrase-fd'
- '0'
- '--batch'
- '--output'
- '${signature}'
- '--detach-sign'
- '-u'
- '{{ .Env.SIGN_KEY_NAME }}'
- '${artifact}'
stdin_file: /tmp/gpg_passphrase