File tree Expand file tree Collapse file tree 2 files changed +55
-18
lines changed
Expand file tree Collapse file tree 2 files changed +55
-18
lines changed Original file line number Diff line number Diff line change 1+ name : CI & Publish
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ tags : [ 'v*' ]
7+ pull_request :
8+ branches : [ master ]
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Set up JDK 25 (Azul Zulu)
19+ if : " !startsWith(github.ref, 'refs/tags/v')"
20+ uses : actions/setup-java@v4
21+ with :
22+ distribution : zulu
23+ java-version : ' 25'
24+ cache : maven
25+
26+ - name : Set up JDK 25 (Azul Zulu) for Maven Central
27+ if : startsWith(github.ref, 'refs/tags/v')
28+ uses : actions/setup-java@v4
29+ with :
30+ distribution : zulu
31+ java-version : ' 25'
32+ cache : maven
33+ server-id : central
34+ server-username : CENTRAL_USERNAME
35+ server-password : CENTRAL_TOKEN
36+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
37+ gpg-passphrase : GPG_PASSPHRASE
38+
39+ - name : Set release version from tag
40+ if : startsWith(github.ref, 'refs/tags/v')
41+ run : |
42+ VERSION=${GITHUB_REF_NAME#v}
43+ echo "Publishing version: $VERSION"
44+ mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
45+
46+ - name : Build and test
47+ run : mvn verify
48+
49+ - name : Publish to Maven Central
50+ if : startsWith(github.ref, 'refs/tags/v')
51+ run : mvn deploy -Prelease -DskipTests
52+ env :
53+ CENTRAL_USERNAME : ${{ secrets.CENTRAL_USERNAME }}
54+ CENTRAL_TOKEN : ${{ secrets.CENTRAL_TOKEN }}
55+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments