Skip to content

Commit fa9c7f8

Browse files
authored
Handle GPG keys without intermediate GitHub Actions (#312)
* Update release.yml * Update .goreleaser.yml
1 parent 653b9e6 commit fa9c7f8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ jobs:
1010
- uses: actions/setup-go@v2
1111
with:
1212
go-version: 1.17
13-
- uses: paultyng/ghaction-import-gpg@v2.1.0
13+
- run: |
14+
gpg --import <<< "$TERRAFORM_REGISTRY_GPG_PRIVATE_KEY"
1415
env:
15-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
16-
PASSPHRASE: ${{ secrets.PASSPHRASE }}
17-
id: import_gpg
16+
TERRAFORM_REGISTRY_GPG_PRIVATE_KEY: ${{ secrets.TERRAFORM_REGISTRY_GPG_PRIVATE_KEY }}
1817
- uses: goreleaser/goreleaser-action@v2
1918
with:
2019
version: latest
2120
args: release --rm-dist
2221
env:
23-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
2422
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2523
synchronize:
2624
# Empyrically equivalent to pressing the "Resync" button in the Settings
@@ -46,5 +44,5 @@ jobs:
4644
END
4745
- run: |
4846
while ! terraform init; do
49-
sleep $((2**++try))
47+
sleep $((2**++try))
5048
done

.goreleaser.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ signs:
4242
# if you are using this is a GitHub action or some other automated pipeline, you
4343
# need to pass the batch flag to indicate its not interactive.
4444
- "--batch"
45-
- "--local-user"
46-
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
4745
- "--output"
4846
- "${signature}"
4947
- "--detach-sign"

0 commit comments

Comments
 (0)