Repository navigation
Expand file tree
/
Copy path.goreleaser.yml
More file actions
246 lines (214 loc) · 5.56 KB
/
Copy path.goreleaser.yml
File metadata and controls
246 lines (214 loc) · 5.56 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
version: 2
project_name: topaz
env:
# https://goreleaser.com/customization/env/
- REGISTRY=ghcr.io
- ORG=aserto-dev
- REPO=topaz
- DESCRIPTION="Topaz Authorization Service"
- LICENSE=Apache-2.0
before:
# https://goreleaser.com/customization/hooks/
hooks:
builds:
# https://goreleaser.com/customization/build/
- id: topazd
main: ./topazd
binary: topazd
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topazd/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topazd/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topazd/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
- id: topaz
main: ./topaz
binary: topaz
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topaz/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topaz/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/topaz/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
- id: topaz-db
main: ./topaz-db
binary: topaz-db
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
- id: topaz-backup
main: ./topaz-backup
binary: topaz-backup
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
env:
- CGO_ENABLED=0
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s
- -w
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.ver={{.Version}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.commit={{.ShortCommit}}
- -X github.com/{{ .Env.ORG }}/{{ .Env.REPO }}/pkg/version.date={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
# https://goreleaser.com/customization/archive/
- formats:
- zip
ids:
- topaz
- topazd
- topaz-backup
files:
- LICENSE
- README.md
name_template: >-
topaz_{{ .Os }}_{{ .Arch }}
checksum:
# https://goreleaser.com/customization/checksum/
name_template: "checksums.txt"
snapshot:
# https://goreleaser.com/customization/snapshots/
version_template: "{{ incpatch .Version }}-{{ .ShortCommit }}{{ if .IsGitDirty }}-dirty{{ end }}"
source:
# https://goreleaser.com/customization/source/
enabled: false
changelog:
# https://goreleaser.com/customization/changelog/
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
# https://goreleaser.com/customization/release/
github:
owner: "{{ .Env.ORG }}"
name: "{{ .Env.REPO }}"
draft: false
prerelease: "false"
name_template: "{{.ProjectName}} {{.Tag}}"
blobs:
# https://goreleaser.com/customization/blob/
homebrew_casks:
# https://goreleaser.com/customization/homebrew_casks/
- name: topaz
repository:
owner: "{{ .Env.ORG }}"
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP }}"
commit_author:
name: Topaz Bot
email: info@topaz.sh
homepage: "https://www.topaz.sh/docs/"
description: "Topaz CLI"
license: "{{ .Env.LICENSE }}"
binaries:
- topaz
skip_upload: false
hooks:
post:
install: |
if OS.mac?
system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/topaz"]
end
dockers_v2:
# https://goreleaser.com/customization/dockers_v2
- dockerfile: "Dockerfile"
platforms:
- linux/amd64
- linux/arm64
ids:
- topaz
- topazd
- topaz-backup
images:
- "{{ .Env.REGISTRY }}/{{ .Env.ORG }}/{{ .Env.REPO }}"
tags:
- "{{ .Version }}"
- "{{ if not .IsSnapshot }}latest{{ end }}"
labels:
"org.opencontainers.image.created": "{{.Date}}"
"org.opencontainers.image.name": "{{.ProjectName}}"
"org.opencontainers.image.revision": "{{.FullCommit}}"
"org.opencontainers.image.version": "{{.Version}}"
"org.opencontainers.image.source": "https://github.com/{{ .Env.ORG }}/{{ .Env.REPO }}"
"org.opencontainers.image.description": "{{ .Env.DESCRIPTION }}"
"org.opencontainers.image.licenses": "{{ .Env.LICENSE }}"
sbom: false # Attestation is not supported for the docker driver.
extra_files:
annotations:
build_args:
flags:
retry:
# https://goreleaser.com/customization/general/retry/
attempts: 10
delay: 10s
max_delay: 5m
sboms:
# https://goreleaser.com/customization/sbom/
- id: default
documents:
- "${artifact}-{{.Os}}-{{.Arch}}.spdx.sbom.json"
cmd: syft
args:
- "$artifact"
- "--output"
- "spdx-json=$document"
env:
- SYFT_FILE_METADATA_CATALOGER_ENABLED=true
artifacts: binary
ids:
- topaz
- topazd
- topaz-backup
- topaz-db