Skip to content

Commit 6231087

Browse files
committed
fix(ci): Remove duplicate GPG key import in release workflow
Remove manual GPG import step that was conflicting with setup-java's built-in GPG handling. The duplicate import was causing exit code 2 errors during both setup and cleanup phases. Now relies entirely on setup-java@v5's declarative gpg-private-key and gpg-passphrase configuration for cleaner key management. Fixes the "Failed to remove private key" error in GitHub Actions.
1 parent 11cc84a commit 6231087

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ jobs:
2424
server-password: MAVEN_PASSWORD # env variable for token in deploy
2525
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} # Value of the GPG private key to import
2626
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
27-
# settings-path: ${{ github.workspace }} # location for the settings.xml file
28-
29-
- id: install-secret-key
30-
name: Install gpg secret key
31-
run: |
32-
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
33-
gpg --list-secret-keys --keyid-format LONG
3427

3528
- name: Publish package
3629
run: mvn --no-transfer-progress --batch-mode -DperformRelease=true clean deploy

0 commit comments

Comments
 (0)