forked from columnar-tech/dbc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
350 lines (317 loc) · 9.94 KB
/
.goreleaser.yaml
File metadata and controls
350 lines (317 loc) · 9.94 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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
# Copyright 2025 Columnar Technologies Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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-pro.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
project_name: dbc
metadata:
description: "A CLI utility for managing ADBC drivers"
license: Apache-2.0
homepage: "https://columnar.tech/dbc"
maintainers:
- "Columnar <hello@columnar.tech>"
builds:
- main: ./cmd/dbc
binary: dbc
ldflags:
- -s -w
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
mod_timestamp: "{{ .CommitTimestamp }}"
hooks:
post: # sign the windows binaries
- if: '{{ and (eq .Os "windows") (isEnvSet "SM_API_KEY") }}'
cmd: >-
smctl sign --keypair-alias "{{ .Env.SM_KEYPAIR_ALIAS }}" --input "{{ .Path }}" --config-file "{{ .Env.PKCS11_CONFIG }}"
archives:
- id: archives
formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}-
{{- .Os }}-
{{- if eq .Arch "386" }}x86
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}-{{ .Version }}
files:
- 'LICENSE*'
- 'README*'
- src: '{{ .ArtifactPath }}*.sig'
strip_parent: true
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
hooks:
after:
# build wheels for each platform we built for
- if: '{{ ne .Os "freebsd" }}'
cmd: >-
uv run ./scripts/create_wheels.py --binary_version {{ .RawVersion }}{{ .Prerelease }}
--platform={{ .Os }}-{{- if eq .Arch "386" }}x86{{else}}{{ .Arch }}{{ end }} --archive=dist/{{ .ProjectName }}-
{{- .Os }}-
{{- if eq .Arch "386" }}x86
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}-{{ .Version }}{{ if eq .Os "windows" }}.zip{{ else }}.tar.gz{{ end }}
blobs:
- ids:
- archives
- msi
- pkgs
provider: s3
if: '{{ not (contains .ArtifactName ".msi.sig" )}}'
region: us-east-2
bucket: dbc-distribution
directory: "{{ .Version }}"
include_meta: true
binary_signs:
# windows binaries are signed in-place and not detached, so we don't provide a .sig for them
- id: signs
if: '{{ ne .Os "windows" }}'
signature: '${artifact}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}.sig'
args: ["--output", "${signature}", "-u", "hello@columnar.tech", "--detach-sign", "${artifact}"]
stdin: "{{ .Env.SIGNING_PASSWORD }}"
changelog:
sort: asc
groups:
- title: Features
regexp: '^.*?feat(\([[:word:]]+(/[[:word:]]+)*\))??!?:.+$'
order: 0
- title: "Bug fixes"
regexp: '^.*?fix(\([[:word:]]+(/[[:word:]]+)*\))??!?:.+$'
order: 1
- title: Others
order: 999
filters:
exclude:
- "^docs:"
- "^test:"
dockers:
- image_templates:
- "columnar/dbc:{{ .Version }}-amd64"
use: buildx
dockerfile: Dockerfile
skip_push: false
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "columnar/dbc:{{ .Tag }}-amd64"
- "columnar/dbc:v{{ .Major }}-amd64"
- "columnar/dbc:v{{ .Major }}.{{ .Minor }}-amd64"
- "columnar/dbc:latest-amd64"
use: buildx
dockerfile: Dockerfile
skip_push: auto
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "columnar/dbc:{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
dockerfile: Dockerfile
skip_push: false
build_flag_templates:
- "--platform=linux/arm64/v8"
- image_templates:
- "columnar/dbc:{{ .Tag }}-arm64v8"
- "columnar/dbc:v{{ .Major }}-arm64v8"
- "columnar/dbc:v{{ .Major }}.{{ .Minor }}-arm64v8"
- "columnar/dbc:latest-arm64v8"
use: buildx
goarch: arm64
dockerfile: Dockerfile
skip_push: auto
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: "columnar/dbc:{{ .Version }}"
image_templates:
- "columnar/dbc:{{ .Version }}-amd64"
- "columnar/dbc:{{ .Version }}-arm64v8"
- name_template: "columnar/dbc:v{{ .Major }}"
skip_push: auto
image_templates:
- "columnar/dbc:v{{ .Major }}-amd64"
- "columnar/dbc:v{{ .Major }}-arm64v8"
- name_template: "columnar/dbc:v{{ .Major }}.{{ .Minor }}"
skip_push: auto
image_templates:
- "columnar/dbc:v{{ .Major }}.{{ .Minor }}-amd64"
- "columnar/dbc:v{{ .Major }}.{{ .Minor }}-arm64v8"
- name_template: "columnar/dbc:{{ .Tag }}"
skip_push: auto
image_templates:
- "columnar/dbc:{{ .Tag }}-amd64"
- "columnar/dbc:{{ .Tag }}-arm64v8"
- name_template: "columnar/dbc:latest"
skip_push: auto
image_templates:
- "columnar/dbc:latest-amd64"
- "columnar/dbc:latest-arm64v8"
# dockerhub:
# - username: "columnar"
# secret_name: "DOCKER_TOKEN"
# disable: '{{ or (not .IsRelease) (ne .Prerelease "") }}'
# images:
# - "columnar/dbc:{{ .Version }}"
# - "columnar/dbc:{{ .Tag }}"
# - "columnar/dbc:v{{ .Major }}"
# - "columnar/dbc:v{{ .Major }}.{{ .Minor }}"
# - "columnar/dbc:latest"
# description: Official Docker images for dbc, the CLI for installing ADBC drivers.
# full_description:
# from_file:
# path: ./resources/README.dockerhub.md
nfpms:
- id: pkgs
package_name: dbc
file_name_template: "{{ .ConventionalFileName }}"
if: '{{ eq .Os "linux" }}'
vendor: Columnar Technologies Inc.
homepage: "https://columnar.tech/dbc"
license: Apache-2.0
description: >-
A CLI utility for managing ADBC drivers
formats:
- deb
- rpm
meta: false
priority: extra
contents:
- src: cmd/dbc/completions/dbc.bash
dst: /etc/bash_completion.d/dbc
- src: cmd/dbc/completions/dbc.zsh
dst: /usr/share/zsh/vendor-completions/_dbc
- src: cmd/dbc/completions/dbc.fish
dst: /usr/share/fish/vendor_completions.d/dbc.fish
snapcrafts:
- id: snaps
name: dbc
summary: CLI for managing ADBC drivers
description: A command-line interface for interacting with ADBC drivers.
icon: ./resources/dbc.png
hooks:
install:
- network
base: bare
confinement: classic
publish: false
plugs:
system-files:
read:
- /etc/adbc
write:
- /etc/adbc
personal-files:
read:
- $HOME/.config/adbc
write:
- $HOME/.config/adbc
msi:
- id: msi
name: "dbc-{{ .Version }}-{{ .MsiArch }}"
wxs: ./resources/dbc.wxs
extensions:
- ui
extra_files:
- ./resources/dbc.ico
- ./resources/dbc.bmp
- ./ui/bitmaps/dlgbmp.bmp
- ./ui/bitmaps/bannrbmp.bmp
signs:
- id: signature-archives
artifacts: archive
ids:
- archives
args: ["--output", "${signature}", "-u", "hello@columnar.tech", "--detach-sign", "${artifact}"]
- id: sign-windows-msi
if: '{{ isEnvSet "SM_API_KEY" }}'
artifacts: installer # Windows MSI installers
cmd: jsign
args: ["-keystore", "{{ .Env.PKCS11_CONFIG }}",
"-storepass", "NONE", "-storetype", "PKCS11", "-alg", "SHA-256", "-tsaurl", "http://timestamp.digicert.com",
"--name", "{{ .ProjectName }} Installer", "-alias", "{{ .Env.SM_KEYPAIR_ALIAS }}", "${artifact}"]
after:
hooks:
- mkdir -p dist/python
- cmd: sh -c "mv dist/*.whl dist/python/"
notarize:
macos:
- enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
sign:
certificate: "{{ .Env.MACOS_SIGN_P12 }}"
password: "{{ .Env.MACOS_SIGN_PASSWORD }}"
notarize:
issuer_id: "{{ .Env.MACOS_NOTARY_ISSUER_ID }}"
key: "{{ .Env.MACOS_NOTARY_KEY }}"
key_id: "{{ .Env.MACOS_NOTARY_KEY_ID }}"
wait: true
timeout: 30m
snapshot:
version_template: "{{ incpatch .Version }}-snapshot"
homebrew_casks:
- name: dbc
alternative_names:
- dbc@{{ .Version }}
- dbc@{{ .Major }}.{{ .Minor }}
ids:
- archives
url:
template: "https://github.com/columnar-tech/dbc/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
verified: "github.com/columnar-tech/dbc/"
cookies:
license: "accept-backup"
commit_msg_template: "Brew cask update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://columnar.tech/dbc"
description: "A CLI utility for managing ADBC drivers"
repository:
owner: "columnar-tech"
name: "homebrew-tap"
branch: main
token_type: "github"
token: "{{ .Env.DBC_TAP_GITHUB_PAT }}" # we'll probably need a dedicated PAT or something?
release:
ids:
- archives
- msi
- snaps
- pkgs
prerelease: auto
extra_files:
- glob: ./dist/*.whl
header: >-
## dbc Release ({{ .Now.Format "2006-01-02" }})
footer: >-
---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
milestones:
- repo:
owner: columnar-tech
name: dbc
close: true
name_template: "{{ .Version }}"