Skip to content

Commit

Permalink
Env var template in signing configuration does not seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyMax committed May 10, 2020
1 parent c2638bf commit 1453233
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .goreleaser-signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down

0 comments on commit 1453233

Please sign in to comment.