Skip to content

Commit 6b7fdc0

Browse files
authored
Update GPG key extraction method in workflow
1 parent eb311c1 commit 6b7fdc0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/flatpak-bundle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ jobs:
7070
# Import separate public key for distribution (not the signing key)
7171
gpg --batch --yes --import flatpak/io.github.andrepg.Doit-latest.pub
7272
73-
# Filter by email to get specific key fingerprint
74-
DIST_KEY_FP=$(gpg --list-public-keys --with-colons "andrepg@users.noreply.github.com" 2>/dev/null | grep "^fpr" | cut -d: -f10)
73+
# Filter by email to get specific key ID (short form for reliable export)
74+
DIST_KEY_ID=$(gpg --list-public-keys --with-colons "andrepg@users.noreply.github.com" 2>/dev/null | grep "^pub" | cut -d: -f5)
7575
76-
# Validate fingerprint was extracted
77-
if [ -z "$DIST_KEY_FP" ]; then
76+
# Validate key ID was extracted
77+
if [ -z "$DIST_KEY_ID" ]; then
7878
echo "ERROR: No key found for andrepg@users.noreply.github.com"
7979
exit 1
8080
fi
8181
8282
# Export as BINARY (no --armor!), then base64 encode
83-
GPG_PUB_KEY=$(gpg --export "$DIST_KEY_FP" | base64 -w0)
84-
83+
GPG_PUB_KEY=$(gpg --export "$DIST_KEY_ID" | base64 -w0)
84+
8585
# Validate base64 output is not empty
8686
if [ -z "$GPG_PUB_KEY" ]; then
8787
echo "ERROR: Failed to export or encode GPG key"

0 commit comments

Comments
 (0)