forked from KusionStack/controller-mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
293 lines (286 loc) · 8.34 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
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
#
# Default: [ 'darwin', 'linux', 'windows' ]
goos:
- linux
- darwin
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
#
# Default: [ '386', 'amd64', 'arm64' ]
goarch:
- amd64
- arm64
ldflags:
- -s -w
main: ./pkg/cmd/manager
id: "ctrlmesh-manager"
binary: ctrlmesh-manager
- env:
- CGO_ENABLED=0
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
#
# Default: [ 'darwin', 'linux', 'windows' ]
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
main: ./pkg/cmd/proxy
id: "ctrlmesh-proxy"
binary: ctrlmesh-proxy
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- -s -w
main: ./pkg/cmd/cert-generator
id: "cert-generator"
binary: cert-generator
archives:
- id: release
builds:
- "manager"
- "proxy"
- "cert-generator"
name_template: "ctrlmesh_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
builds_info:
mode: 0644
# format is `time.RFC3339Nano`
mtime: 2008-01-02T15:04:05Z
# format_overrides:
# - goos: windows
# format: zip
files:
- LICENSE
- README.md
- docs/*
- src: dist/CHANGELOG.md
strip_parent: true
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: desc
# Changelog generation implementation to use.
#
# Valid options are:
# - `git`: uses `git log`;
# - `github`: uses the compare GitHub API, appending the author login to the changelog.
# - `gitlab`: uses the compare GitLab API, appending the author name and email to the changelog.
# - `github-native`: uses the GitHub release notes generation API, disables the groups feature.
#
# Default: 'git'
use: github
# Group commits messages by given regex and title.
# Order value defines the order of the groups.
# Providing no regex means all commits will be grouped under the default group.
# Groups are disabled when using github-native, as it already groups things by itself.
# Matches are performed against strings of the form: "<abbrev-commit>[:] <title-commit>".
# Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 0
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 1
- title: 'Performance improvements'
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
order: 2
- title: 'Refactors'
regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
order: 3
- title: 'Tests'
regexp: '^.*?test(\([[:word:]]+\))??!?:.+$'
order: 4
- title: 'Documents'
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 5
- title: 'Chores'
regexp: '^.*?chore(\([[:word:]]+\))??!?:.+$'
order: 6
- title: 'CI'
regexp: '^.*?ci(\([[:word:]]+\))??!?:.+$'
order: 7
- title: Others
order: 999
filters:
exclude:
- '^style:'
release:
github:
owner: KusionStack
name: controller-mesh
draft: false
footer: |
## Docker Images
* `kusionstack/ctrlmesh-manager:{{ .Tag }}`
* `kusionstack/ctrlmesh-proxy:{{ .Tag }}`
* `kusionstack/ctrlmesh-init:{{ .Tag }}`
dockers:
- id: manager
ids:
- ctrlmesh-manager
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-manager:latest'
dockerfile: ./artifacts/goreleaser/manager.Dockerfile
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-manager"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- id: manager-arm
ids:
- ctrlmesh-manager
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-manager:latest'
dockerfile: ./artifacts/goreleaser/manager.Dockerfile
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-manager"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
- id: proxy
ids:
- ctrlmesh-proxy
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-proxy:latest'
dockerfile: ./artifacts/goreleaser/proxy.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-proxy"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- id: proxy-arm
ids:
- ctrlmesh-proxy
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-proxy:latest'
dockerfile: ./artifacts/goreleaser/proxy.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-proxy"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
- id: init
ids:
- cert-generator
#skip_push: true
goos: linux
goarch: amd64
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
#- 'kusionstack/ctrlmesh-init:latest'
dockerfile: ./artifacts/goreleaser/init.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-init"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- id: init-arm
ids:
- cert-generator
#skip_push: true
goos: linux
goarch: arm64
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'
#- 'kusionstack/ctrlmesh-init:latest'
dockerfile: ./artifacts/goreleaser/init.Dockerfile
extra_files:
- artifacts/scripts/
use: docker
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name=ctrlmesh-init"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
docker_manifests:
- name_template: 'kusionstack/ctrlmesh-manager:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-manager:latest'
image_templates:
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-manager:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-proxy:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-proxy:latest'
image_templates:
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-proxy:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-init:{{ .Tag }}'
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'
- name_template: 'kusionstack/ctrlmesh-init:latest'
image_templates:
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-amd64'
- 'kusionstack/ctrlmesh-init:{{ .Tag }}-arm64'