File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to Maven Central on VERSION change
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ paths :
8+ - ' VERSION'
9+
10+ jobs :
11+ publish :
12+ name : Publish to Maven Central
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+
17+ env :
18+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
19+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
20+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v5
25+
26+ - name : Set up Java & Maven for Central
27+ uses : actions/setup-java@v4
28+ with :
29+ distribution : ' temurin'
30+ java-version : ' 8'
31+ cache : maven
32+
33+ # for central-publishing-maven-plugin
34+ server-id : central
35+ server-username : MAVEN_USERNAME
36+ server-password : MAVEN_PASSWORD
37+
38+ # import the private key only
39+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
40+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
41+
42+ - name : Publish to Maven Central
43+ run : mvn -B clean deploy --no-transfer-progress
You can’t perform that action at this time.
0 commit comments