Skip to content

Commit 12710c6

Browse files
committed
Fixed the workflow issue
1 parent 23b89ba commit 12710c6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/maven--package-publish.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ jobs:
1717
java-version: '11'
1818
distribution: 'adopt'
1919
server-id: ossrh
20-
server-username: ${{ secrets.OSSRH_USERNAME }}
21-
server-password: ${{ secrets.OSSRH_TOKEN }}
20+
server-username: MAVEN_USERNAME
21+
server-password: MAVEN_PASSWORD
2222
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
23-
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
24-
- name: Publish package
25-
run: mvn clean deploy
23+
gpg-passphrase: GPG_PASSPHRASE
24+
- name: Publish to Maven Central Repository
25+
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} deploy
26+
env:
27+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
28+
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
29+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
2630

2731
# run: mvn --batch-mode deploy

0 commit comments

Comments
 (0)