-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yml
More file actions
200 lines (189 loc) · 6.47 KB
/
Copy path.goreleaser.yml
File metadata and controls
200 lines (189 loc) · 6.47 KB
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
version: 2
project_name: testapp
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- riscv64
main: ./cmd/testapp
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
archives:
- name_template: >-
{{ .ProjectName }}-
{{- .Os }}-
{{- .Arch }}
format_overrides:
- goos: windows
formats: [ zip ]
builds_info:
group: root
owner: root
files:
- README.md
- LICENSE
release:
mode: replace
draft: false
prerelease: auto
# Templates: allowed
footer: |
## Docker images
```
{{ .Env.IMAGE }}:{{ .Version }}
```
github:
owner: go-faster
name: testapp
dockers:
# https://goreleaser.com/customization/docker/
- use: buildx
goos: linux
goarch: amd64
image_templates:
- "{{ .Env.IMAGE }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE }}:latest-amd64"
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/go-faster/testapp/main/README.md"
- "--label=io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/93744681?"
- "--label=io.artifacthub.package.maintainers=[{\"name\":\"Aleksandr Razumov\",\"email\":\"ernado@go-faster.org\"}]"
- "--label=io.artifacthub.package.license=Apache 2.0"
- "--label=org.opencontainers.image.description=Testing application"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- use: buildx
goos: linux
goarch: arm64
image_templates:
- "{{ .Env.IMAGE }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE }}:latest-arm64"
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/go-faster/testapp/main/README.md"
- "--label=io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/93744681?"
- "--label=io.artifacthub.package.maintainers=[{\"name\":\"Aleksandr Razumov\",\"email\":\"ernado@go-faster.org\"}]"
- "--label=io.artifacthub.package.license=Apache 2.0"
- "--label=org.opencontainers.image.description=Testing application"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- use: buildx
goos: linux
goarch: riscv64
image_templates:
- "{{ .Env.IMAGE }}:{{ .Version }}-riscv64"
- "{{ .Env.IMAGE }}:latest-riscv64"
build_flag_templates:
- "--platform=linux/riscv64"
- "--pull"
# riscv64 architecture support for static images
# https://github.com/go-riscv/distroless
# https://github.com/GoogleContainerTools/distroless/issues/1269
- "--build-arg"
- "IMG=ghcr.io/go-riscv/distroless/static-unstable"
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/go-faster/testapp/main/README.md"
- "--label=io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/93744681?"
- "--label=io.artifacthub.package.maintainers=[{\"name\":\"Aleksandr Razumov\",\"email\":\"ernado@go-faster.org\"}]"
- "--label=io.artifacthub.package.license=Apache 2.0"
- "--label=org.opencontainers.image.description=Testing application"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
docker_manifests:
# https://goreleaser.com/customization/docker_manifest/
- name_template: "{{ .Env.IMAGE }}:{{ .Version }}"
image_templates:
- "{{ .Env.IMAGE }}:{{ .Version }}-amd64"
- "{{ .Env.IMAGE }}:{{ .Version }}-arm64"
- "{{ .Env.IMAGE }}:{{ .Version }}-riscv64"
- name_template: "{{ .Env.IMAGE }}:latest"
image_templates:
- "{{ .Env.IMAGE }}:latest-amd64"
- "{{ .Env.IMAGE }}:latest-arm64"
- "{{ .Env.IMAGE }}:latest-riscv64"
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ incpatch .Version }}-next"
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: 'Helm chart updates'
order: 700
regexp: '^.*?(feat|fix|chore)\(helm\)!?:.+$'
- title: 'Dependency updates'
regexp: '^.*?(feat|fix|chore)\(deps\)!?:.+$'
order: 300
- title: 'New Features'
regexp: '^.*?feat(\(\S+\))??!?:.+$'
order: 100
- title: 'Security updates'
regexp: '^.*?sec(\(\S+\))??!?:.+$'
order: 150
- title: 'Performance updates'
regexp: '^.*?perf(\(\S+\))??!?:.+$'
order: 250
- title: 'Bug fixes'
regexp: '^.*?fix(\(\S+\))??!?:.+$'
order: 200
- title: 'Documentation updates'
regexp: '^.*?docs(\(\S+\))??!?:.+$'
order: 400
- title: 'Benchmarking tooling changes'
regexp: '^.*?(\(\S*bench\S*\))!?:.+$'
order: 450
- title: 'Build process updates'
regexp: '^.*?build(\(\S+\))??!?:.+$'
order: 500
- title: 'CI/CD updates'
regexp: '^.*?ci(\(\S+\))??!?:.+$'
order: 600
- title: 'Updates to tests'
regexp: '^.*?test(\(\S+\))??!?:.+$'
order: 600
- title: Other work
order: 9999
sboms:
- artifacts: archive
nfpms:
- package_name: go-faster-testapp
homepage: https://github.com/go-faster/testapp
maintainer: Aleksandr Razumov <ernado@go-faster.org>
description: Test application
license: Apache 2.0
formats:
- apk
- deb
- rpm
- archlinux
deb:
lintian_overrides:
- statically-linked-binary
- changelog-file-missing-in-native-package