-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure GitHub Release to Maven Central
[skip ci]
- Loading branch information
Showing
1 changed file
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|