File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to Maven Central
2+
3+ on : [release]
4+
5+ jobs :
6+ test :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
10+
11+ - name : Set up JDK
12+ uses : actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
13+ with :
14+ distribution : temurin
15+ java-version : 8
16+ server-id : central
17+ server-username : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
18+ server-password : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
19+ gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
20+ gpg-passphrase : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
21+
22+ - name : Cache local Maven repository
23+ uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
24+ with :
25+ path : ~/.m2/repository
26+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
27+ restore-keys : |
28+ ${{ runner.os }}-maven-
29+
30+ - name : Publish to Apache Maven Central
31+ run : ./mvnw deploy -DperformRelease=true
32+ env :
33+ MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USERNAME }}
34+ MAVEN_CENTRAL_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
35+ MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }}
You can’t perform that action at this time.
0 commit comments