forked from open-horizon/vault-exchange-auth
-
Notifications
You must be signed in to change notification settings - Fork 1
/
goreleaser.yaml
244 lines (222 loc) · 6 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
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
project_name: openbao-plugin-auth-openhorizon
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
#gomod:
# proxy: true
# env:
# - GOPROXY=https://proxy.golang.org,direct
# - GOSUMDB=sum.golang.org
builds:
- id: builds-darwin
env:
- CGO_ENABLED=0
goos:
- darwin
goarch:
- amd64
- arm64
goarm64:
- "v9.0"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "darwin") }}true{{ else }}false{{ end }}'
- id: builds-freebsd
env:
- CGO_ENABLED=0
goos:
- freebsd
goarch:
- amd64
- arm
goarm:
- "6"
- "7"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "freebsd") }}true{{ else }}false{{ end }}'
- id: builds-illumos
env:
- CGO_ENABLED=0
goos:
- illumos
goarch:
- amd64
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "illumos") }}true{{ else }}false{{ end }}'
- id: builds-linux
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm
- arm64
- ppc64le
- riscv64
- s390x
goarm:
- "6"
- "7"
goarm64:
- "v9.0"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "linux") }}true{{ else }}false{{ end }}'
- id: builds-netbsd
env:
- CGO_ENABLED=0
goos:
- netbsd
goarch:
- amd64
- arm
goarm:
- "6"
- "7"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "netbsd") }}true{{ else }}false{{ end }}'
- id: builds-openbsd
env:
- CGO_ENABLED=0
goos:
- openbsd
goarch:
- amd64
- arm
- arm64
goarm:
- "6"
- "7"
goarm64:
- "v9.0"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "openbsd") }}true{{ else }}false{{ end }}'
- id: builds-solaris
env:
- CGO_ENABLED=0
goos:
- solaris
goarch:
- amd64
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "solaris") }}true{{ else }}false{{ end }}'
- id: builds-windows
env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- "6"
- "7"
goarm64:
- "v9.0"
main: ./cmd/openbao-plugin-auth-openhorizon
mod_timestamp: "{{ .CommitTimestamp }}"
skip: '{{- if not (eq .Env.RELEASE_BUILD_GOOS "windows") }}true{{ else }}false{{ end }}'
report_sizes: true
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Env.RELEASE_BUILD_GOOS }}-checksums.txt'
disable: false
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
{{- if .Arm64 }}{{ .Arm64 }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
files:
- 'LICENSE.txt'
- 'README.md'
- 'CHANGELOG.md'
builds_info:
group: root
owner: root
mode: 0755
# format is `time.RFC3339Nano`
mtime: 2008-01-02T15:04:05Z
allow_different_binary_count: true
sboms:
- artifacts: archive
- id: binary
artifacts: binary
documents:
- >-
{{ .Binary }}_{{ .Version }}_{{ .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
{{- if .Arm64 }}{{ .Arm64 }}{{ end }}.sbom.json
- id: package
artifacts: package
changelog:
use: github
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
signs:
- id: cosign
artifacts: all
cmd: cosign
certificate: "${artifact}.pem"
args:
- "sign-blob"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes" # needed on cosign 2.0.0+
# - id: gpg
# artifacts: all
# signature: "${artifact}.gpgsig"
# cmd: gpg
# stdin: "{{ .Env.GPG_PASSWORD }}"
# args:
# - "--batch"
# - "--default-key={{ .Env.GPG_FINGERPRINT }}"
# - "--output=${signature}"
# - "--detach-sign"
# - "${artifact}"
release:
github:
owner: '{{ .Env.GITHUB_REPOSITORY_OWNER }}'
name: openbao-plugin-auth-openhorizon
prerelease: '{{ .Env.GITHUB_RELEASE_PRERELEASE }}'
make_latest: '{{ .Env.GITHUB_RELEASE_MAKE_LATEST }}'
disable: false
# We overwrite the following variables to support multi-stage execution of
# goreleaser on the same artifacts with different GOOS values, to avoid
# running out of disk space. We can't support draft releases because the same
# release needs to be used for all artifacts uploaded from separate stages.
draft: false
replace_existing_draft: false
replace_existing_artifacts: false