-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.goreleaser.yaml
126 lines (114 loc) · 3.59 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
# Based on: https://github.com/argoproj-labs/gitops-promoter/blob/main/.goreleaser.yaml
# The lines below are called `modelines`. See `:help modeline`
# yaml-language-server: $schema=https://raw.githubusercontent.com/goreleaser/goreleaser/v2.3.2/www/docs/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
project_name: gitops-promoter
version: 2
dist: release_dist
before:
hooks:
- go mod tidy
- go mod download
- make manifests-release IMAGE_TAG={{ .Tag }}
builds:
- id: gitops-promoter
main: ./cmd
binary: gitops-promoter
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
flags:
- -v
goos:
- linux
ldflags:
- -X github.com/argoproj-labs/gitops-promoter/common.version={{ .Version }}
- -X github.com/argoproj-labs/gitops-promoter/common.buildDate={{ .Date }}
- -extldflags="-static"
dockers:
- image_templates:
- quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}-amd64
dockerfile: release.Dockerfile
skip_push: "{{ .IsSnapshot }}"
use: buildx
goarch: amd64
extra_files:
- hack/git/promoter_askpass.sh
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/amd64"
- image_templates:
- quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}-arm64
dockerfile: release.Dockerfile
extra_files:
- hack/git/promoter_askpass.sh
skip_push: "{{ .IsSnapshot }}"
use: buildx
goarch: arm64
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--platform=linux/arm64"
docker_manifests:
- name_template: "quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}"
image_templates:
- "quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}-amd64"
- "quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}-arm64"
archives:
- id: binary
format: tar.gz
builds:
- "gitops-promoter"
# 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 }}
release:
prerelease: auto
draft: true
extra_files:
- glob: ./install.yaml
header: |
## gitops-promoter
{{ .Date }}
### Container images
- quay.io/argoprojlabs/gitops-promoter:{{ .Tag }}
footer: |
**Full Changelog**: https://github.com/argoproj-labs/gitops-promoter/compare/{{ .PreviousTag }}...{{ .Tag }}
changelog:
use:
github
sort: asc
abbrev: 0
groups: # Regex use RE2 syntax as defined here: https://github.com/google/re2/wiki/Syntax.
- title: 'Features'
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
order: 100
- title: 'Bug fixes'
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
order: 200
- title: 'Documentation'
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$'
order: 300
- title: 'Dependency updates'
regexp: '^.*?(feat|fix|chore)\(deps?.+\)!?:.+$'
order: 400
- title: 'Other work'
order: 999
filters:
exclude:
- '^test:'
- '^.*?Bump(\([[:word:]]+\))?.+$'