File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release and push to central
2+ on :
3+ push :
4+ tags :
5+ - ' *'
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v2
11+ - name : Set up Java for publishing to Maven Central Repository
12+ uses : actions/setup-java@v1
13+ with :
14+ java-version : 1.8
15+ server-id : ossrh
16+ server-username : MAVEN_USERNAME
17+ server-password : MAVEN_PASSWORD
18+ gpg-private-key : ${{ secrets.OSSRH_GPG_SECRET_KEY }}
19+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
20+ - name : build artifact
21+ run : mvn clean package
22+ - name : Create release
23+ uses : ncipollo/release-action@v1
24+ with :
25+ allowUpdates : true
26+ artifacts : " ${{ github.workspace }}/target/*.jar"
27+ token : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Publish to the Maven Central Repository
29+ run : |
30+ mvn \
31+ --no-transfer-progress \
32+ --batch-mode \
33+ deploy
34+ env :
35+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
36+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
37+ MAVEN_GPG_PASSPHRASE : ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
You can’t perform that action at this time.
0 commit comments