1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

docs: use --output-signature with cosign sign (#3218)

`cosign sign` complains with the following error when using `--output`
⨯ release failed after 14.73s error=sign: cosign failed: exit status 1: WARNING: the '--output' flag is deprecated and will be removed in the future. Use '--output-signature'
This commit is contained in:
Radu Jipa 2022-06-30 18:20:24 +01:00 committed by GitHub
parent e9088c3df1
commit 16a2a25936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,6 @@ signs:
# Defaults to `["--output", "${signature}", "--detach-sign", "${artifact}"]`
args: ["--output", "${signature}", "${artifact}", "{{ .ProjectName }}"]
# Which artifacts to sign
#
# all: all artifacts
@ -126,7 +125,7 @@ Assuming you have a `cosign.key` in the repository root and a `COSIGN_PWD` envir
signs:
- cmd: cosign
stdin: '{{ .Env.COSIGN_PWD }}'
args: ["sign-blob", "--key=cosign.key", "--output=${signature}", "${artifact}"]
args: ["sign-blob", "--key=cosign.key", "--output-signature=${signature}", "${artifact}"]
artifacts: all
```
@ -209,7 +208,7 @@ but you'll need to manually add the `.sig` files to the release and/or archive:
builds:
- hooks:
post:
- sh -c "COSIGN_PASSWORD=$COSIGN_PWD cosign sign-blob --key cosign.key --output dist/{{ .ProjectName }}_{{ .Version }}_{{ .Target }}.sig {{ .Path }}"
- sh -c "COSIGN_PASSWORD=$COSIGN_PWD cosign sign-blob --key cosign.key --output-signature dist/{{ .ProjectName }}_{{ .Version }}_{{ .Target }}.sig {{ .Path }}"
# add to the release directly:
release: