File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments