File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,14 @@ jobs:
3232 -
3333 name : Import GPG key
3434 id : import_gpg
35- 36- env :
37- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
38- PASSPHRASE : ${{ secrets.PASSPHRASE }}
35+ run : |
36+ gpg-agent --daemon --allow-preset-passphrase
37+ gpg --batch --import --yes <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
38+ export KEY_FINGERPRINT=$(gpg --list-secret-keys --with-colons | grep sec | cut -d ':' -f 5)
39+ export KEY_GRIP=$(gpg-connect-agent 'KEYINFO --list' /bye | grep KEYINFO | cut -d ' ' -f 3)
40+ export PASSPHRASE_HEX=$(echo -n "${{ secrets.GPG_PASSPHRASE }}" | xxd -p -u -c 265)
41+ gpg-connect-agent "PRESET_PASSPHRASE $KEY_GRIP -1 $PASSPHRASE_HEX" /bye
42+ echo "::set-output name=fingerprint::$KEY_FINGERPRINT"
3943 -
4044 name : Run GoReleaser
4145 uses : goreleaser/goreleaser-action@v2
You can’t perform that action at this time.
0 commit comments