diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c892ba46..42d543864 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -537,9 +537,10 @@ jobs: run: | echo "$GPG_PRIVATE_KEY" | gpg --batch --import # Set ultimate trust so GPG will use the key on a fresh runner - FPR=$(gpg --list-secret-keys --with-colons 2>/dev/null | grep '^fpr' | head -1 | cut -d: -f10) + FPR=$(gpg --list-secret-keys --with-colons --with-fingerprint 2>/dev/null | awk -F: '/^fpr/{print $10; exit}') + echo "Fingerprint: $FPR" echo "${FPR}:6:" | gpg --import-ownertrust - KEY_ID=$(gpg --list-secret-keys --keyid-format long --with-colons 2>/dev/null | grep '^sec' | head -1 | cut -d: -f5) + KEY_ID=$(gpg --list-secret-keys --keyid-format long --with-colons 2>/dev/null | awk -F: '/^sec/{print $5; exit}') echo "Signing with key: $KEY_ID" cd release-files if [ -n "$GPG_PASSPHRASE" ]; then