Skip to content

Commit

Permalink
Configure GitHub Release to Maven Central
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
oranheim committed Sep 27, 2024
1 parent 1e8b75f commit ecfbe82
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/manual-github-release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,33 @@ jobs:
git config user.email "[email protected]"
git config user.name "GitHub Actions"
- name: Configure GPG
run: |
mkdir -p ~/.gnupg
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "batch" >> ~/.gnupg/gpg.conf
echo "no-tty" >> ~/.gnupg/gpg.conf
gpg-connect-agent reloadagent /bye
echo "GPG configuration completed"
- name: Import GPG key
env:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
run: |
echo "$GPG_SECRET" | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
echo "GPG key imported successfully"
- name: Debug GPG
run: |
gpg --version
gpg-agent --version
echo "GNUPGHOME=$GNUPGHOME"
ls -la ~/.gnupg
cat ~/.gnupg/gpg.conf
cat ~/.gnupg/gpg-agent.conf
- name: Release with Maven
env:
Expand All @@ -69,8 +90,7 @@ jobs:
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
run: |
mvn -X --batch-mode release:clean release:prepare release:perform \
-Dgpg.passphrase=${GPG_PASSPHRASE} \
-Dgpg.keyname=${GPG_KEY_ID} \
-Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE} -Dgpg.keyname=${GPG_KEY_ID} -Dgpg.pinentry-mode=loopback" \
-DskipTests \
-P oss-maven-central
Expand Down

0 comments on commit ecfbe82

Please sign in to comment.