Skip to content

Commit f1e5e73

Browse files
committed
Fix GPG fingerprint formatting and signing test
- Convert fingerprint to uppercase and remove spaces for ownertrust import - Fix signing test to properly pipe passphrase and data
1 parent 796fcfd commit f1e5e73

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,16 @@ jobs:
287287
rm -f "$KEY_FILE"
288288
289289
# Trust the key (required for signing)
290-
# Format: fingerprint:trust-level:
290+
# Format: fingerprint:trust-level: (fingerprint must be uppercase, no spaces)
291291
# Use ultimate trust (6) for the subkey
292-
echo "$GPG_FINGERPRINT:6:" | gpg --import-ownertrust
292+
FINGERPRINT_UPPER=$(echo "$GPG_FINGERPRINT" | tr '[:lower:]' '[:upper:]' | tr -d ' ')
293+
echo "$FINGERPRINT_UPPER:6:" | gpg --import-ownertrust
293294
294295
# Verify key is available
295296
gpg --list-secret-keys --keyid-format LONG
296297
297298
# Test signing capability with passphrase from stdin
298-
echo "$GPG_PASSPHRASE" | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --local-user "$GPG_FINGERPRINT" --sign --armor <<< "test" > /dev/null 2>&1 && echo "✓ GPG signing test successful" || echo "⚠ GPG signing test failed"
299+
(echo "$GPG_PASSPHRASE"; echo "test") | gpg --batch --yes --pinentry-mode loopback --passphrase-fd 0 --local-user "$GPG_FINGERPRINT" --sign --armor > /dev/null 2>&1 && echo "✓ GPG signing test successful" || echo "⚠ GPG signing test failed"
299300
300301
- name: Run GoReleaser
301302
uses: goreleaser/goreleaser-action@v6

0 commit comments

Comments
 (0)