-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yaml
373 lines (329 loc) · 9.78 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# Copyright © 2023 KubeCub open source community. All rights reserved.
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.
before:
hooks:
# You may remove this if you don't use go modules.
- make clean
- make tidy
- make copyright-add
# you may remove this if you don't need go generate
- make generate
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
snapshot:
name_template: "{{ incpatch .Version }}-next"
report_sizes: true
# metadata:
# mod_timestamp: "{{ .CommitTimestamp }}"
# Default: './dist'
dist: _output/dist
builds:
- binary: syncer
id: syncer
main: ./cmd/syncer/main.go
goos:
- windows
- darwin
- linux
- freebsd
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 6
- 7
- binary: exporter
id: exporter
main: ./cmd/exporter/main.go
goos:
- windows
- darwin
- linux
- freebsd
goarch:
- amd64
- 386
- arm
- arm64
goarm:
- 6
- 7
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
files:
- LICENSE
- README.md
- CHANGELOG/*
- docs/*
# a more complete example, check the globbing deep dive below
- src: "*.md"
dst: docs
# Strip parent folders when adding files to the archive.
strip_parent: true
# File info.
# Not all fields are supported by all formats available formats.
#
# Default: copied from the source file
info:
# Templates: allowed (since v1.14)
owner: root
# Templates: allowed (since v1.14)
group: root
# Must be in time.RFC3339Nano format.
#
# Templates: allowed (since v1.14)
mtime: "{{ .CommitDate }}"
# File mode.
mode: 0644
format_overrides:
- goos: windows
format: zip
nfpms:
- id: packages
builds:
- syncer
# Your app's vendor.
vendor: kubecub
homepage: https://github.com/kubecub/github-label-syncer
maintainer: kubbot <https://github.com/kubbot>
description: |-
Auto sync github labels
Kubecub && cubxxw
license: MIT
formats:
- apk
- deb
- rpm
- termux.deb # Since: v1.11
- archlinux # Since: v1.13
dependencies:
- git
recommends:
- golang
changelog:
sort: asc
use: github
filters:
exclude:
- "^test:"
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: Dependency updates
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
order: 300
- title: "New Features"
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: "Security updates"
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: "Documentation updates"
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
order: 400
- title: "Build process updates"
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
order: 400
- title: Other work
order: 9999
# # semantization
# snapcrafts:
# - name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
# summary: sync labels
# description: |
# sync labels
# grade: stable
# confinement: classic
# publish: true
# sboms:
# - artifacts: archive
# signs:
# - cmd: cosign
# stdin: '{{ .Env.COSIGN_PWD }}'
# args:
# - "sign-blob"
# - "--key=cosign.key"
# - "--output-signature=${signature}"
# - "${artifact}"
# - "--yes" # needed on cosign 2.0.0+
# artifacts: all
# docker_signs:
kos:
- repository: ghcr.io/kubecub/syncer
id: syncer
tags:
- '{{.Version}}'
- latest
bare: true
main: ./cmd/syncer/main.go
preserve_import_paths: false
base_image: alpine
platforms:
- linux/amd64
- linux/arm64
- repository: ghcr.io/kubecub/exporter
id: exporter
tags:
- '{{.Version}}'
- latest
bare: true
main: ./cmd/exporter/main.go
base_image: alpine
preserve_import_paths: false
platforms:
- linux/amd64
- linux/arm64
# .goreleaser.yaml
milestones:
# You can have multiple milestone configs
-
# Repository for the milestone
# Default is extracted from the origin remote URL
repo:
owner: user
name: repo
# Whether to close the milestone
close: true
# Fail release on errors, such as missing milestone.
fail_on_error: false
# Name of the milestone
#
# Default: '{{ .Tag }}'
name_template: "Current Release"
publishers:
- name: "fury.io"
ids:
- packages
dir: "{{ dir .ArtifactPath }}"
cmd: |
bash -c '
if [[ "{{ .Tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/{{ .Env.USERNAME }}/
else
echo "Skipping deployment: Non-production release detected"
fi'
checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
algorithm: sha256
# dockers:
# - use: buildx
# ids:
# - syncer
# goos: linux
# goarch: amd64
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-amd64
# dockerfile: deploy/syncer/Dockerfile.syncer
# build_flag_templates:
# - --pull
# - --platform=linux/amd64
# - --label=io.syncer.image.created={{.Date}}
# - --label=io.syncer.image.title=syncer
# - --label=io.syncer.image.revision={{.ShortCommit}}
# - --label=io.syncer.image.version={{.Tag }}
# - --label=io.syncer.image.auth={{ .Env.USERNAME }}
# - use: buildx
# ids:
# - syncer
# goos: linux
# goarch: arm64
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-amd64
# dockerfile: docker/syncer/Dockerfile.syncer
# build_flag_templates:
# - --pull
# - --platform=linux/amd64
# - --label=io.syncer.image.created={{.Date}}
# - --label=io.syncer.image.title=syncer
# - --label=io.syncer.image.revision={{.ShortCommit}}
# - --label=io.syncer.image.version={{.Tag }}
# - --label=io.syncer.image.auth={{ .Env.USERNAME }}
# - use: buildx
# ids:
# - exporter
# goos: linux
# goarch: amd64
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-amd64
# dockerfile: deploy/exporter/Dockerfile.exporter
# build_flag_templates:
# - --pull
# - --platform=linux/amd64
# - --label=io.exporter.image.created={{.Date}}
# - --label=io.exporter.image.title=exporter
# - --label=io.exporter.image.revision={{.ShortCommit}}
# - --label=io.exporter.image.version={{.Tag }}
# - --label=io.exporter.image.auth={{ .Env.USERNAME }}
# - use: buildx
# ids:
# - exporter
# goos: linux
# goarch: arm64
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-arm64
# dockerfile: docker/exporter/Dockerfile.exporter
# build_flag_templates:
# - --pull
# - --platform=linux/arm64
# - --label=io.exporter.image.created={{.Date}}
# - --label=io.exporter.image.title=exporter
# - --label=io.exporter.image.revision={{.ShortCommit}}
# - --label=io.exporter.image.version={{.Tag }}
# - --label=io.exporter.image.auth={{ .Env.USERNAME }}
# docker_manifests:
# - name_template: ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-amd64
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-arm64
# - name_template: ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-amd64
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-arm64
# - name_template: ghcr.io/{{ .Env.USERNAME }}/exporter:latest
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-amd64
# - ghcr.io/{{ .Env.USERNAME }}/exporter:{{ .Tag }}-arm64
# - name_template: ghcr.io/{{ .Env.USERNAME }}/syncer:latest
# image_templates:
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-amd64
# - ghcr.io/{{ .Env.USERNAME }}/syncer:{{ .Tag }}-arm64
# docker_signs:
# - cmd: cosign
# artifacts: manifests
# output: true
# args:
# - "sign"
# - "${artifact}@${digest}"
# - --yes
release:
footer: |
**Full Changelog**: https://github.com/kubecub/goreleaser/compare/{{ .PreviousTag }}...{{ .Tag }}
## Helping out
This release is only possible thanks to **all** the support of some **awesome people**!
Want to be one of them?
You can [sponsor](https://goreleaser.com/sponsors/), get a [Pro License](https://goreleaser.com/pro) or [contribute with code](https://goreleaser.com/contributing).
## Where to go next?
* Find examples and commented usage of all options in our [website](https://goreleaser.com/intro/).
* Reach out on [Discord](https://discord.gg/RGEBtg8vQ6) and [Twitter](https://twitter.com/goreleaser)!
<a href="https://goreleaser.com"><img src="https://raw.githubusercontent.com/goreleaser/artwork/master/opencollective-header.png" with="100%" alt="GoReleaser logo"></a>