Log in
.goreleaser.yml 431 lines · 14.2 KB · yaml Blame
1
version: 2
2
3
before:
4
  hooks:
5
    - go mod tidy
6
7
###
8
# Builds
9
###
10
11
nix:
12
  - url_template: "https://github.com/helmwave/helmwave/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
13
    name: helmwave
14
    ids: [ helmwave ]
15
16
    homepage: https://helmwave.app/
17
    description: "Helmwave is true release management for helm"
18
    license: "mit"
19
20
    # Repository to push the generated files to.
21
    repository:
22
      owner: helmwave
23
      name: NUR
24
      branch: main
25
26
27
28
builds:
29
  - &bin
30
    id: "helmwave"
31
    env:
32
      - CGO_ENABLED=0
33
    goarch:
34
      - amd64
35
      - arm64
36
    goamd64:
37
      # Go can build using different instruction sets - https://github.com/golang/go/wiki/MinimumRequirements#amd64
38
      # We don't really need this type of optimization (limiting CPUs helmwave can run on) so we use general v1.
39
      - v1
40
    goos:
41
      - linux
42
      # - windows
43
      - darwin
44
    main: ./cmd/helmwave
45
    ldflags:
46
      - -s -w -X github.com/helmwave/helmwave/pkg/version.Version={{ .Version }}
47
48
  #  - <<: *bin
49
  #    main: ./cmd/schema
50
  #    id: schema
51
  #    binary: schema
52
53
  - <<: *bin
54
    main: ./cmd/gitops
55
    id: gitops
56
    binary: gitops
57
58
###
59
# Packages
60
###
61
archives:
62
  - &archive
63
    builds: [ helmwave ]
64
    name_template: >-2
65
      {{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}
66
      {{- with .Arm }}v{{ . }}{{ end -}}
67
      {{- with .Mips }}_{{ . }}{{ end -}}
68
      {{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end -}}
69
    id: helmwave
70
    format: tar.gz
71
    format_overrides:
72
      - goos: windows
73
        format: zip
74
75
  - <<: *archive
76
    id: gitops
77
    builds: [ gitops ]
78
79
80
nfpms:
81
  - &nfpms
82
    id: helmwave
83
    maintainer: [email protected]
84
    builds: [ helmwave ]
85
    formats:
86
      - apk
87
      - deb
88
      - rpm
89
90
  - <<: *nfpms
91
    id: gitops
92
    package_name: gitops
93
    builds: [ gitops ]
94
95
96
checksum:
97
  name_template: "checksums.txt"
98
99
dockers:
100
  # helmwave
101
  - dockerfile: Dockerfile
102
    image_templates:
103
      - ghcr.io/helmwave/helmwave:{{ .Version }}-scratch-amd64
104
      - ghcr.io/helmwave/helmwave:scratch-amd64
105
      - diamon/helmwave:{{ .Version }}-scratch-amd64
106
      - diamon/helmwave:scratch-amd64
107
    build_flag_templates:
108
      - "--label=org.opencontainers.image.description=Helmwave is true release management for helm"
109
      - "--label=org.opencontainers.image.created={{ .Date }}"
110
      - "--label=org.opencontainers.image.title={{ .ProjectName }}"
111
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
112
      - "--label=org.opencontainers.image.version={{ .Version }}"
113
      - "--label=org.opencontainers.image.licenses=MIT"
114
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
115
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/helmwave"
116
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
117
118
      - "--platform=linux/amd64"
119
      - "--target=scratch-goreleaser"
120
      - "--pull"
121
    goos: linux
122
    goarch: amd64
123
    goamd64: v1
124
    use: buildx
125
  - dockerfile: Dockerfile
126
    image_templates:
127
      - ghcr.io/helmwave/helmwave:{{ .Version }}-scratch-arm64v8
128
      - ghcr.io/helmwave/helmwave:scratch-arm64v8
129
      - diamon/helmwave:{{ .Version }}-scratch-arm64v8
130
      - diamon/helmwave:scratch-arm64v8
131
    build_flag_templates:
132
      - "--label=org.opencontainers.image.description=Helmwave is true release management for helm"
133
      - "--label=org.opencontainers.image.created={{ .Date }}"
134
      - "--label=org.opencontainers.image.title={{ .ProjectName }}"
135
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
136
      - "--label=org.opencontainers.image.version={{ .Version }}"
137
      - "--label=org.opencontainers.image.licenses=MIT"
138
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
139
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/helmwave"
140
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
141
142
      - "--platform=linux/arm64/v8"
143
      - "--target=scratch-goreleaser"
144
      - "--pull"
145
    goos: linux
146
    goarch: arm64
147
    use: buildx
148
  - dockerfile: Dockerfile
149
    image_templates:
150
      - ghcr.io/helmwave/helmwave:{{ .Version }}-amd64
151
      - ghcr.io/helmwave/helmwave:latest-amd64
152
      - diamon/helmwave:{{ .Version }}-amd64
153
      - diamon/helmwave:latest-amd64
154
    build_flag_templates:
155
      - "--label=org.opencontainers.image.description=Helmwave is true release management for helm"
156
      - "--label=org.opencontainers.image.created={{ .Date }}"
157
      - "--label=org.opencontainers.image.title={{ .ProjectName }}"
158
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
159
      - "--label=org.opencontainers.image.version={{ .Version }}"
160
      - "--label=org.opencontainers.image.licenses=MIT"
161
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
162
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/helmwave"
163
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
164
165
      - "--platform=linux/amd64"
166
      - "--target=goreleaser"
167
      - "--pull"
168
    goos: linux
169
    goarch: amd64
170
    goamd64: v1
171
    use: buildx
172
  - dockerfile: Dockerfile
173
    image_templates:
174
      - ghcr.io/helmwave/helmwave:{{ .Version }}-arm64v8
175
      - ghcr.io/helmwave/helmwave:latest-arm64v8
176
      - diamon/helmwave:{{ .Version }}-arm64v8
177
      - diamon/helmwave:latest-arm64v8
178
    build_flag_templates:
179
      - "--label=org.opencontainers.image.description=Helmwave is true release management for helm"
180
      - "--label=org.opencontainers.image.created={{ .Date }}"
181
      - "--label=org.opencontainers.image.title={{ .ProjectName }}"
182
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
183
      - "--label=org.opencontainers.image.version={{ .Version }}"
184
      - "--label=org.opencontainers.image.licenses=MIT"
185
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
186
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/helmwave"
187
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
188
189
      - "--platform=linux/arm64/v8"
190
      - "--target=goreleaser"
191
      - "--pull"
192
    goos: linux
193
    goarch: arm64
194
    use: buildx
195
196
  # gitops
197
  - dockerfile: Dockerfile
198
    image_templates:
199
      - ghcr.io/helmwave/gitops:{{ .Version }}-scratch-amd64
200
      - ghcr.io/helmwave/gitops:scratch-amd64
201
    build_flag_templates:
202
      - "--label=org.opencontainers.image.description=GitOps plugin for helmwave"
203
      - "--label=org.opencontainers.image.created={{ .Date }}"
204
      - "--label=org.opencontainers.image.title=gitops"
205
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
206
      - "--label=org.opencontainers.image.version={{ .Version }}"
207
      - "--label=org.opencontainers.image.licenses=MIT"
208
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
209
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/gitops"
210
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
211
212
      - "--platform=linux/amd64"
213
      - "--target=scratch-goreleaser"
214
      - "--pull"
215
      - "--build-arg=PROJECT=gitops"
216
    goos: linux
217
    goarch: amd64
218
    goamd64: v1
219
    use: buildx
220
  - dockerfile: Dockerfile
221
    image_templates:
222
      - ghcr.io/helmwave/gitops:{{ .Version }}-scratch-arm64v8
223
      - ghcr.io/helmwave/gitops:scratch-arm64v8
224
    build_flag_templates:
225
      - "--label=org.opencontainers.image.description=GitOps plugin for helmwave"
226
      - "--label=org.opencontainers.image.created={{ .Date }}"
227
      - "--label=org.opencontainers.image.title=gitops"
228
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
229
      - "--label=org.opencontainers.image.version={{ .Version }}"
230
      - "--label=org.opencontainers.image.licenses=MIT"
231
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
232
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/gitops"
233
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
234
235
      - "--platform=linux/arm64/v8"
236
      - "--target=scratch-goreleaser"
237
      - "--pull"
238
      - "--build-arg=PROJECT=gitops"
239
    goos: linux
240
    goarch: arm64
241
    use: buildx
242
  - dockerfile: Dockerfile
243
    image_templates:
244
      - ghcr.io/helmwave/gitops:{{ .Version }}-amd64
245
      - ghcr.io/helmwave/gitops:latest-amd64
246
    build_flag_templates:
247
      - "--label=org.opencontainers.image.description=GitOps plugin for helmwave"
248
      - "--label=org.opencontainers.image.created={{ .Date }}"
249
      - "--label=org.opencontainers.image.title=gitops"
250
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
251
      - "--label=org.opencontainers.image.version={{ .Version }}"
252
      - "--label=org.opencontainers.image.licenses=MIT"
253
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
254
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/gitops"
255
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
256
257
      - "--platform=linux/amd64"
258
      - "--target=goreleaser"
259
      - "--pull"
260
      - "--build-arg=PROJECT=gitops"
261
    goos: linux
262
    goarch: amd64
263
    goamd64: v1
264
    use: buildx
265
  - dockerfile: Dockerfile
266
    image_templates:
267
      - ghcr.io/helmwave/gitops:{{ .Version }}-arm64v8
268
      - ghcr.io/helmwave/gitops:latest-arm64v8
269
    build_flag_templates:
270
      - "--label=org.opencontainers.image.description=GitOps plugin for helmwave"
271
      - "--label=org.opencontainers.image.created={{ .Date }}"
272
      - "--label=org.opencontainers.image.title=gitops"
273
      - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
274
      - "--label=org.opencontainers.image.version={{ .Version }}"
275
      - "--label=org.opencontainers.image.licenses=MIT"
276
      - "--label=org.opencontainers.image.source=https://github.com/helmwave/helmwave"
277
      - "--label=org.opencontainers.image.url=https://github.com/helmwave/helmwave/pkgs/container/gitops"
278
      - "--label=org.opencontainers.image.documentation=https://helmwave.app/"
279
280
      - "--platform=linux/arm64/v8"
281
      - "--target=goreleaser"
282
      - "--pull"
283
      - "--build-arg=PROJECT=gitops"
284
    goos: linux
285
    goarch: arm64
286
    use: buildx
287
288
docker_manifests:
289
  # helmwave: GitHub Container Registry
290
  - name_template: ghcr.io/helmwave/helmwave:{{ .Version }}-scratch
291
    image_templates:
292
      - ghcr.io/helmwave/helmwave:{{ .Version }}-scratch-amd64
293
      - ghcr.io/helmwave/helmwave:{{ .Version }}-scratch-arm64v8
294
  - name_template: ghcr.io/helmwave/helmwave:scratch
295
    image_templates:
296
      - ghcr.io/helmwave/helmwave:scratch-amd64
297
      - ghcr.io/helmwave/helmwave:scratch-arm64v8
298
  - name_template: ghcr.io/helmwave/helmwave:{{ .Version }}
299
    image_templates:
300
      - ghcr.io/helmwave/helmwave:{{ .Version }}-amd64
301
      - ghcr.io/helmwave/helmwave:{{ .Version }}-arm64v8
302
  - name_template: ghcr.io/helmwave/helmwave:latest
303
    image_templates:
304
      - ghcr.io/helmwave/helmwave:latest-amd64
305
      - ghcr.io/helmwave/helmwave:latest-arm64v8
306
307
  # gitops: GitHub Container Registry
308
  - name_template: ghcr.io/helmwave/gitops:{{ .Version }}-scratch
309
    image_templates:
310
      - ghcr.io/helmwave/gitops:{{ .Version }}-scratch-amd64
311
      - ghcr.io/helmwave/gitops:{{ .Version }}-scratch-arm64v8
312
  - name_template: ghcr.io/helmwave/gitops:scratch
313
    image_templates:
314
      - ghcr.io/helmwave/gitops:scratch-amd64
315
      - ghcr.io/helmwave/gitops:scratch-arm64v8
316
  - name_template: ghcr.io/helmwave/gitops:{{ .Version }}
317
    image_templates:
318
      - ghcr.io/helmwave/gitops:{{ .Version }}-amd64
319
      - ghcr.io/helmwave/gitops:{{ .Version }}-arm64v8
320
  - name_template: ghcr.io/helmwave/gitops:latest
321
    image_templates:
322
      - ghcr.io/helmwave/gitops:latest-amd64
323
      - ghcr.io/helmwave/gitops:latest-arm64v8
324
325
  # helmwave: DockerHub
326
  - name_template: diamon/helmwave:{{ .Version }}
327
    image_templates:
328
      - diamon/helmwave:{{ .Version }}-amd64
329
      - diamon/helmwave:{{ .Version }}-arm64v8
330
  - name_template: diamon/helmwave:latest
331
    image_templates:
332
      - diamon/helmwave:latest-amd64
333
      - diamon/helmwave:latest-arm64v8
334
  - name_template: diamon/helmwave:{{ .Version }}-scratch
335
    image_templates:
336
      - diamon/helmwave:{{ .Version }}-scratch-amd64
337
      - diamon/helmwave:{{ .Version }}-scratch-arm64v8
338
  - name_template: diamon/helmwave:scratch
339
    image_templates:
340
      - diamon/helmwave:scratch-amd64
341
      - diamon/helmwave:scratch-arm64v8
342
343
344
###
345
# Publishes
346
###
347
348
changelog:
349
  disable: true
350
  use: github
351
  sort: asc
352
353
  groups:
354
    - title: "Tests"
355
      regexp: "^.*\\(tests?\\):.*$"
356
      order: 0
357
    - title: "Dependencies"
358
      regexp: "^.*\\(deps\\):.*$"
359
      order: 1
360
    - title: "CI"
361
      regexp: "^.*\\(ci\\):.*$"
362
      order: 2
363
    - title: "New Features"
364
      regexp: "^feat(\\(.*\\))?:.*$"
365
      order: 3
366
    - title: "Bug Fixes"
367
      regexp: "^fix(\\(.*\\))?:.*$"
368
      order: 3
369
    - title: "Linter"
370
      regexp: "^.*linter.*$"
371
      order: 4
372
    - title: "Other"
373
      order: 999
374
375
  filters:
376
    exclude:
377
      - "^WIP:"
378
      - Merge pull request
379
      - Merge branch
380
      - go mod tidy
381
      - typo
382
      - "^chore"
383
384
snapshot:
385
  version_template: "{{ .Tag }}-next"
386
387
release:
388
  name_template: "v{{ .Version }}"
389
  #  draft: true
390
  prerelease: auto
391
392
brews:
393
  - ids: [ helmwave ]
394
    repository:
395
      owner: helmwave
396
      name: homebrew-tap
397
      token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
398
      pull_request:
399
        enabled: false
400
    goamd64: v1
401
    homepage: https://helmwave.app/
402
    description: "Helmwave is true release management for helm"
403
    license: MIT
404
    directory: Formula
405
    skip_upload: auto
406
407
    custom_block: |
408
      head "https://github.com/helmwave/helmwave.git", branch: "main"
409
    test: |
410
      assert_match version.to_s, shell_output("#{bin/"helmwave"} --version")
411
    extra_install: |
412
      generate_completions_from_executable(bin/"helmwave", "completion", shells: [:bash, :zsh])
413
414
milestones:
415
  - close: true
416
    fail_on_error: false
417
    name_template: "{{ .Tag }}"
418
419
report_sizes: true
420
421
###
422
# Announces
423
###
424
425
announce:
426
  telegram:
427
    enabled: true
428
    chat_id: -1001484486010
429
    message_template: |
430
      Helmwave *{{ replace .Tag "." "\\." }}* is ready\!
431
      See more: https://github\.com/helmwave/helmwave/releases/tag/{{ replace .Tag "." "\\." }}