-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
266 lines (229 loc) · 8.03 KB
/
.goreleaser.yaml
File metadata and controls
266 lines (229 loc) · 8.03 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
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
# GoReleaser config for OpenKMS
# Version is read from .release-version into RELEASE_VERSION
version: 2
project_name: openkms
builds:
- id: server
binary: openkms-server
main: ./cmd/openkms-server
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -extldflags "-static"
- -X 'github.com/Gosayram/openkms/internal/version.Version={{ .Env.RELEASE_VERSION }}'
- -X 'github.com/Gosayram/openkms/internal/version.Commit={{ .Commit }}'
- -X 'github.com/Gosayram/openkms/internal/version.Date={{ .Date }}'
- -s
- -w
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
goarm:
- "7"
ignore:
- goos: darwin
goarch: arm64
goarm: "7"
- id: cli
binary: openkms-cli
main: ./cmd/openkms-cli
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -extldflags "-static"
- -X 'github.com/Gosayram/openkms/internal/version.Version={{ .Env.RELEASE_VERSION }}'
- -X 'github.com/Gosayram/openkms/internal/version.Commit={{ .Commit }}'
- -X 'github.com/Gosayram/openkms/internal/version.Date={{ .Date }}'
- -s
- -w
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
goarm:
- "7"
ignore:
- goos: darwin
goarch: arm64
goarm: "7"
archives:
- id: default
# Includes built binaries + files below
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
files:
- README.md
- LICENSE
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt"
algorithm: sha256
signs:
- id: checksum
artifacts: checksum
signature: "${artifact}.sig"
cmd: gpg
args:
- "--batch"
- "--pinentry-mode=loopback"
- "--passphrase={{ .Env.GPG_PASSPHRASE }}"
- "--default-key={{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
binary_signs:
- id: binaries
artifacts: binary
signature: "{{ .ArtifactName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}.sig"
cmd: gpg
args:
- "--batch"
- "--pinentry-mode=loopback"
- "--passphrase={{ .Env.GPG_PASSPHRASE }}"
- "--default-key={{ .Env.GPG_FINGERPRINT }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
release:
mode: replace
header: |
## OpenKMS {{ .Tag }}
Release {{ .Tag }} of OpenKMS - autonomous, easily deployable, opinionated KMS for on-prem/air-gap infrastructures.
### Docker Images (signed with Cosign)
Docker images are available at GitHub Container Registry (ghcr.io). All images are signed with Cosign:
- `server:{{ .Version }}` and `server:latest`
- `cli:{{ .Version }}` and `cli:latest`
Verify image signatures using the public key from the repository:
```bash
export USERNAME=<your-github-username>
cosign login ghcr.io -u "$USERNAME"
cosign verify --key cosign.pub ghcr.io/{{ .Env.DOCKER_REPO_PATH }}/server:{{ .Version }}
```
The `cosign.pub` file is available in the repository root.
### Binaries (signed with GPG)
This release includes the following binaries, signed with GPG:
- `openkms-server` - OpenKMS server
- `openkms-cli` - OpenKMS CLI tool
### Installation
Download the appropriate binary or archive for your platform from the assets below.
### Verification
Verify checksums:
```bash
sha256sum --check {{ .ProjectName }}_{{ .Version }}_checksums.txt
```
Verify checksum signature:
```bash
gpg --verify {{ .ProjectName }}_{{ .Version }}_checksums.txt.sig {{ .ProjectName }}_{{ .Version }}_checksums.txt
```
Verify binary signatures:
```bash
# For Linux amd64
gpg --verify openkms-server_linux_amd64.sig openkms-server
gpg --verify openkms-cli_linux_amd64.sig openkms-cli
# For other platforms, replace linux_amd64 with your platform (e.g., darwin_arm64v8, windows_amd64)
```
footer: |
**Full Changelog**: {{ .Env.GITHUB_REPO_URL }}/compare/{{ .PreviousTag }}...{{ .Tag }}
changelog:
sort: asc
use: github
format: "{{ .SHA }}: {{ .Message }}{{ with .AuthorUsername }} (@{{ . }}){{ end }}"
filters:
exclude:
- "^test:"
- "^test\\("
- "^chore: update$"
- "^chore: docs$"
- "^docs: update$"
- "^chore: schema$"
- "^chore: typo$"
- "^chore: auto-update generated files$"
- "^chore: update schema$"
- "^chore: schema update$"
- "^chore\\(deps\\): "
- "^(build|ci): "
- "merge conflict"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
groups:
- title: "New Features"
regexp: '^.*?(\[ADD\]|\[FEATURE\]|\[INIT\]|feat(\(.+\))?!?:|feature(\(.+\))?!?:|add(\(.+\))?!?:|init(\(.+\))?!?:|\[feature\/.+\]).*$'
order: 100
- title: "Performance improvements"
regexp: '^.*?(\[perf\]|perf(\(.+\))?!?:).*$'
order: 120
- title: "Security updates"
regexp: '^.*?sec(\(.+\))?!?:.+$'
order: 150
- title: "Bug fixes"
regexp: '^.*?(\[FIX\]|\[BUGFIX\]|fix(\(.+\))?!?:|bugfix(\(.+\))?!?:).*$'
order: 200
- title: "Refactoring"
regexp: '^.*?(\[REFACTOR\]|refactor(\(.+\))?!?:).*$'
order: 250
- title: "Updates and Enhancements"
regexp: '^.*?\[UPD\].*$'
order: 300
- title: "Documentation updates"
regexp: '^.*?(\[DOCS\]|docs?(\(.+\))?!?:).*$'
order: 400
- title: "Tests"
regexp: '^.*?(\[TEST\]|test(\(.+\))?!?:).*$'
order: 450
- title: "CI and Build"
regexp: '^.*?(\[CI\]|\[CHORE\]|\[LINT\]|ci(\(.+\))?!?:|build(\(.+\))?!?:|chore(\(.+\))?!?:|lint(\(.+\))?!?:).*$'
order: 500
- title: "Dependencies"
regexp: '^.*?Bump .*$'
order: 600
- title: "Other work"
order: 9999
announce:
telegram:
# Whether its enabled or not.
enabled: true
# Integer representation of your channel
# Templates: allowed.
chat_id: "{{ .Env.OPENKMS_CHAT_ID }}"
# Message template to use while publishing.
# Using MarkdownV2 format with proper escaping
message_template: |
🎉 *{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }}* {{ mdv2escape "is out!" }}
📋 *{{ mdv2escape "Release Information:" }}*
• {{ mdv2escape "Version:" }} `{{ mdv2escape .Version }}`
• {{ mdv2escape "Commit:" }} `{{ mdv2escape .ShortCommit }}`
• {{ mdv2escape "Date:" }} `{{ mdv2escape .Date }}`
{{- if .PreviousTag }}
• {{ mdv2escape "Previous:" }} `{{ mdv2escape .PreviousTag }}`
{{- end }}
📦 *{{ mdv2escape "Docker Images:" }}*
{{ mdv2escape "All images are signed with Cosign and available at GitHub Container Registry:" }}
• [{{ mdv2escape "Server" }}]({{ .Env.GITHUB_REPO_URL }}/pkgs/container/{{ .Env.REPO_NAME }}%2Fserver) `{{ mdv2escape .Version }}` / `latest`
• [{{ mdv2escape "CLI" }}]({{ .Env.GITHUB_REPO_URL }}/pkgs/container/{{ .Env.REPO_NAME }}%2Fcli) `{{ mdv2escape .Version }}` / `latest`
• [{{ mdv2escape "Server Slim" }}]({{ .Env.GITHUB_REPO_URL }}/pkgs/container/{{ .Env.REPO_NAME }}%2Fserver-slim) `{{ mdv2escape .Version }}` / `latest`
📥 *{{ mdv2escape "Binaries:" }}*
{{ mdv2escape "Signed binaries and checksums available for Linux, macOS, and Windows (amd64 and arm64) in the" }} [{{ mdv2escape "release assets" }}]({{ .ReleaseURL }})\.
🔗 *{{ mdv2escape "Links:" }}*
• [{{ mdv2escape "View Full Release" }}]({{ .ReleaseURL }})
• [{{ mdv2escape "Changelog" }}]({{ .Env.GITHUB_REPO_URL }}/blob/{{ mdv2escape .Tag }}/CHANGELOG.md)
• [{{ mdv2escape "Repository" }}]({{ .Env.GITHUB_REPO_URL }})
{{- if .PreviousTag }}
• [{{ mdv2escape "Compare Changes" }}]({{ .Env.GITHUB_REPO_URL }}/compare/{{ mdv2escape .PreviousTag }}...{{ mdv2escape .Tag }})
{{- end }}
# Parse mode.
# Valid options are MarkdownV2 and HTML.
parse_mode: MarkdownV2