generated from ekristen/go-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.goreleaser.yml
66 lines (66 loc) · 1.74 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
version: 2
release:
github:
owner: ekristen
name: distillery
prerelease: auto
env:
- CGO_ENABLED=0
builds:
- id: distillery
binary: dist
goos:
- linux
- windows
- darwin
- freebsd
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s
- -w
- -extldflags="-static"
- -X '{{ .ModulePath }}/pkg/common.SUMMARY=v{{ .Version }}'
- -X '{{ .ModulePath }}/pkg/common.BRANCH={{ .Branch }}'
- -X '{{ .ModulePath }}/pkg/common.VERSION={{ .Tag }}'
- -X '{{ .ModulePath }}/pkg/common.COMMIT={{ .Commit }}'
mod_timestamp: '{{ .CommitTimestamp }}'
hooks:
post:
- cmd: |
{{- if eq .Os "darwin" -}}
quill sign-and-notarize "{{ .Path }}" --dry-run={{ .IsSnapshot }} --ad-hoc={{ .IsSnapshot }} -vv
{{- else -}}
true
{{- end -}}
env:
- QUILL_LOG_FILE=/tmp/quill-{{ .Target }}.log
sboms:
- artifacts: archive
archives:
- id: distillery
builds:
- distillery
name_template: "{{ .ProjectName }}-v{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ .Arm }}"
format_overrides:
- goos: windows
format: zip
signs:
- ids:
- default
cmd: cosign
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
args:
["sign-blob", "--yes", "--oidc-provider=github", "--oidc-issuer=https://token.actions.githubusercontent.com", "--output-certificate=${certificate}", "--output-signature=${signature}", "${artifact}"]
artifacts: all
checksum:
name_template: "checksums.txt"
snapshot:
version_template: '{{ trimprefix .Summary "v" }}'
# We are skipping changelog because we are using semantic release
changelog:
disable: true