File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publishing to Maven Packages
2+ # on: [ push ] # Trigger the workflow when a push (commit) event occurs
3+ on :
4+ release :
5+ types : [ created ]
6+ jobs :
7+ publish-maven :
8+ runs-on : ubuntu-latest
9+ permissions :
10+ contents : read
11+ packages : write
12+ steps :
13+ - uses : actions/checkout@v3
14+ - name : Set up Maven Central Repository
15+ uses : actions/setup-java@v3
16+ with :
17+ java-version : ' 11'
18+ distribution : ' adopt'
19+ server-id : ossrh
20+ server-username : MAVEN_USERNAME
21+ server-password : MAVEN_PASSWORD
22+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
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 }}
30+
31+ # run: mvn --batch-mode deploy
You can’t perform that action at this time.
0 commit comments