Skip to content

Commit 6261e6c

Browse files
committed
ci: Include signature inside archives
1 parent 2ec5e8c commit 6261e6c

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/.goreleaser.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,20 @@ builds:
1212

1313
# https://goreleaser.com/customization/archive
1414
archives:
15-
- formats: [tar.gz]
15+
- id: archives
16+
formats: [tar.gz]
1617
# this name template makes the OS and Arch compatible with the results of `uname`.
1718
name_template: >-
1819
{{ .ProjectName }}_
1920
{{- title .Os }}_
2021
{{- if eq .Arch "amd64" }}x86_64
2122
{{- else }}{{ .Arch }}{{ end }}
2223
{{- if .Arm }}v{{ .Arm }}{{ end }}
24+
files:
25+
- LICENSE
26+
- CHANGELOG.md
27+
- src: "{{ .ArtifactPath }}.sig"
28+
strip_parent: true
2329
# use zip for windows archives
2430
format_overrides:
2531
- goos: windows
@@ -36,7 +42,7 @@ changelog:
3642
# https://goreleaser.com/customization/notarize
3743
notarize:
3844
macos:
39-
- enabled: true
45+
- enabled: '{{ isEnvSet "MACOS_SIGN_P12" }}'
4046
sign:
4147
certificate: "{{ .Env.MACOS_SIGN_P12 }}"
4248
password: "{{ .Env.MACOS_SIGN_PASSWORD }}"
@@ -47,11 +53,17 @@ notarize:
4753

4854
# https://goreleaser.com/customization/binary_sign
4955
binary_signs:
50-
- cmd: cosign
56+
- id: cosign
57+
signature: "${artifact}.sig"
58+
cmd: cosign
5159
stdin: "{{ .Env.COSIGN_PWD }}"
5260
args:
5361
- sign-blob
5462
- --key=env://COSIGN_KEY
5563
- --output-signature=${signature}
5664
- ${artifact}
5765
- --yes
66+
67+
# https://goreleaser.com/customization/release
68+
release:
69+
ids: [archives]

0 commit comments

Comments
 (0)