55 inputs :
66 new_version :
77 description : ' New version to set (e.g., 1.0-RC1, 1.0)'
8- default : 2.11
8+ default : 2.12-RC1
99 required : true
1010 type : string
1111
2020 environment : maven
2121 steps :
2222 - uses : actions/checkout@v4
23+
24+ - name : Maven cache
25+ uses : actions/cache@v4
26+ env :
27+ cache-name : maven-cache
28+ with :
29+ path : ~/.m2
30+ key : build-${{ env.cache-name }}
2331 - name : Set up Java and Maven
2432 uses : actions/setup-java@v4
2533 with :
@@ -32,19 +40,21 @@ jobs:
3240 gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
3341 gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
3442
35- - name : Maven cache
36- uses : actions/cache@v4
37- env :
38- cache-name : maven-cache
39- with :
40- path : ~/.m2
41- key : build-${{ env.cache-name }}
42-
43- - name : Bump version in pom.xml
43+ - name : Print Maven Settings.xml for Debugging
44+ # This step helps debug by printing the effective Maven settings.xml
45+ # It will show if the 'central' server configuration is correctly added.
46+ run : |
47+ cat ~/.m2/settings.xml
48+ shell : bash
49+ - name : Bump version in pom.xml && Deploy JAR to Maven Central
4450 run : mvn versions:set -DnewVersion=${{ github.event.inputs.new_version }} -DgenerateBackupPoms=false
4551
4652 - name : Deploy JAR to Maven Central
4753 run : mvn clean deploy -Pcentral
54+ env :
55+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
56+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
57+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
4858
4959 - name : Create Pull Request for Version Bump
5060 uses : peter-evans/create-pull-request@v6
0 commit comments