Env var template in signing configuration does not seems to work

This commit is contained in:
CrazyMax 2020-05-10 16:12:19 +02:00
parent c2638bf40c
commit 145323343f
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
3 changed files with 3 additions and 10 deletions

View File

@ -73,7 +73,6 @@ jobs:
go-version: 1.13
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
@ -84,13 +83,9 @@ jobs:
with:
version: latest
args: -f .goreleaser-signing.yml check --debug
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
-
name: GoReleaser
uses: ./
with:
version: latest
args: -f .goreleaser-signing.yml release --skip-publish --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

View File

@ -37,4 +37,4 @@ checksum:
signs:
-
artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
args: ["--batch", "-u", "27571A53B86AF0C799B38BA77D851EB72D73BDA0", "--output", "${signature}", "--detach-sign", "${artifact}"]

View File

@ -97,7 +97,6 @@ If [signing is enabled](https://goreleaser.com/customization/#Signing) in your G
```yaml
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
@ -110,15 +109,14 @@ If [signing is enabled](https://goreleaser.com/customization/#Signing) in your G
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
```
Reference the fingerprint in your signing configuration using the `GPG_FINGERPRINT` envrionment variable:
And reference the userID in your signing configuration:
```yaml
signs:
- artifacts: checksum
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
args: ["--batch", "-u", "<key id, fingerprint, email, ...>", "--output", "${signature}", "--detach-sign", "${artifact}"]
```
## Customizing