Skip to content

Commit 1b78e0e

Browse files
committed
#initial-commit
1 parent 8fa340f commit 1b78e0e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/maven-publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ jobs:
2525
run: |
2626
rm -rf ~/.gnupg
2727
28+
- name: Start gpg-agent
29+
run: |
30+
echo "Starting gpg-agent..."
31+
gpgconf --launch gpg-agent
32+
shell: bash
33+
2834
- name: Import GPG key
2935
run: |
3036
echo "$GPG_PRIVATE_KEY" | gpg --batch --yes --import
@@ -42,7 +48,7 @@ jobs:
4248
run: echo "GPG_KEYNAME=${{ secrets.GPG_KEYNAME }}" >> $GITHUB_ENV
4349

4450
- name: Publish to Maven Central
45-
run: mvn --batch-mode deploy -P release -Dgpg.keyname=${{ env.GPG_KEYNAME }}
51+
run: mvn --batch-mode deploy -P release -Dgpg.keyname=${{ env.GPG_KEYNAME }} -Dgpg.passphrase=${{ env.GPG_PASSPHRASE }}
4652
env:
4753
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
4854
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

0 commit comments

Comments
 (0)