-
Notifications
You must be signed in to change notification settings - Fork 80
/
.goreleaser.yml
76 lines (66 loc) · 1.65 KB
/
.goreleaser.yml
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
version: 2
before:
hooks:
- go mod tidy
builds:
- <<: &build_defaults
main: ./cmd/hcloud/main.go
binary: hcloud
flags:
- -trimpath
ldflags:
- -s
- -w
- -X {{ .ModulePath }}/internal/version.version={{ .Version }}
- -X {{ .ModulePath }}/internal/version.versionPrerelease={{- if .IsSnapshot -}}dev+{{ .ShortCommit }}{{- end -}}
env:
- CGO_ENABLED=0
id: hcloud-build
goos: [freebsd, windows, linux]
goarch: [amd64, arm, arm64, "386"]
goarm: ["6", "7"]
- <<: *build_defaults
id: hcloud-build-darwin
goos: [darwin]
goarch: [amd64, arm64]
hooks:
post:
- cmd: >
go -C ./tools run github.com/anchore/quill/cmd/quill
sign-and-notarize "{{ .Path }}"
--dry-run={{ .IsSnapshot }}
--ad-hoc={{ .IsSnapshot }}
output: true
snapshot:
version_template: "{{ .Version }}-dev+{{ .ShortCommit }}"
checksum:
name_template: checksums.txt
algorithm: sha256
signs:
- artifacts: all
signature: ${artifact}.sig
id: hcloud-sign
ids:
- hcloud-build
- hcloud-build-darwin
args:
- --batch
- --local-user=github-bot@hetzner-cloud.de
- --pinentry-mode=loopback
- --output=${signature}
- --detach-sign
- ${artifact}
archives:
- id: hcloud-archive
builds:
- hcloud-build
- hcloud-build-darwin
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
release:
draft: false