Skip to content

Commit 3f2e75a

Browse files
authored
Base64-decode PGP_SECRET before passing to Gradle (#7)
The PGP_SECRET repository secret is stored base64-encoded (matching fgbio's convention), but Gradle's useInMemoryPgpKeys expects the raw ASCII-armored key. Decode it in the workflow before invoking Gradle.
1 parent 77f41dd commit 3f2e75a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ jobs:
117117
fi
118118
119119
- name: Publish to Maven Central
120-
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
120+
run: |
121+
export PGP_SECRET=$(echo "$PGP_SECRET_B64" | base64 --decode)
122+
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
121123
env:
122124
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
123125
SONATYPE_PASS: ${{ secrets.SONATYPE_PASS }}
124-
PGP_SECRET: ${{ secrets.PGP_SECRET }}
126+
PGP_SECRET_B64: ${{ secrets.PGP_SECRET }}
125127
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
126128

127129
- name: Upload release JAR

0 commit comments

Comments
 (0)