Skip to content

Commit 28ffa93

Browse files
committed
release workflow
1 parent 691132f commit 28ffa93

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,18 @@ jobs:
2626
go-version-file: 'go.mod'
2727
cache: true
2828
- name: Import GPG key
29-
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
30-
id: import_gpg
31-
with:
32-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
33-
passphrase: ${{ secrets.PASSPHRASE }}
29+
env:
30+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
31+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
32+
run: |
33+
gpg --batch --import --yes <<<"$GPG_PRIVATE_KEY"
34+
gpg --with-keygrip --list-secret-keys
35+
KEY=$(gpg --batch --with-colons --with-keygrip --list-secret-keys | sed -En 's|^grp:+(.*):$|\1|p')
36+
echo "GPG_FINGERPRINT=$KEY" >> $GITHUB_ENV
3437
- name: Run GoReleaser
3538
uses: goreleaser/goreleaser-action@ec59f474b9834571250b370d4735c50f8e2d1e29 # v7.0.0
3639
with:
3740
args: release --clean
3841
env:
3942
# GitHub sets the GITHUB_TOKEN secret automatically.
4043
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 commit comments

Comments
 (0)