File tree Expand file tree Collapse file tree 4 files changed +35
-24
lines changed
Expand file tree Collapse file tree 4 files changed +35
-24
lines changed Original file line number Diff line number Diff line change 2929 java-version : 17
3030 distribution : temurin
3131 cache : ' maven'
32+ server-id : central
33+ server-username : MAVEN_USERNAME
34+ server-password : MAVEN_CENTRAL_TOKEN
35+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
36+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
3237
3338 - name : Change version to release version
3439 # Assume that RELEASE_VERSION will have form like: "v1.0.1". So we cut the "v"
@@ -37,15 +42,12 @@ jobs:
3742 env :
3843 RELEASE_VERSION : ${{ github.event.release.tag_name }}
3944
40- - name : Release Maven package
41- uses : samuelmeuli/action-maven-publish@v1
42- with :
43- maven_profiles : " release"
44- maven_args : ${{ env.MAVEN_ARGS }}
45- gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
46- gpg_passphrase : ${{ secrets.GPG_PASSPHRASE }}
47- nexus_username : ${{ secrets.OSSRH_USERNAME }}
48- nexus_password : ${{ secrets.OSSRH_TOKEN }}
45+ - name : Publish to Apache Maven Central
46+ run : mvn package deploy -Prelease
47+ env :
48+ MAVEN_USERNAME : ${{ secrets.NEXUS_USERNAME }}
49+ MAVEN_CENTRAL_TOKEN : ${{ secrets.NEXUS_PASSWORD }}
50+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
4951
5052 # This is separate job because there were issues with git after release step, was not able to commit changes.
5153 update-working-version :
Original file line number Diff line number Diff line change 3030 echo "Setting version_branch to v4"
3131 echo "tmp_version_branch=v4" >> "$GITHUB_ENV"
3232 - if : ${{ startsWith(github.event.release.tag_name, 'v5.' ) }}
33+ run : |
34+ echo "Setting version_branch to 5.0.x"
35+ echo "tmp_version_branch=5.0.x" >> "$GITHUB_ENV"
36+ - if : ${{ startsWith(github.event.release.tag_name, 'v6.' ) }}
3337 run : |
3438 echo "Setting version_branch to main"
3539 echo "tmp_version_branch=main" >> "$GITHUB_ENV"
Original file line number Diff line number Diff line change @@ -33,14 +33,18 @@ jobs:
3333 - name : Set up Java and Maven
3434 uses : actions/setup-java@v4
3535 with :
36- distribution : temurin
3736 java-version : 17
37+ distribution : temurin
3838 cache : ' maven'
39- - name : Release Maven package
40- uses : samuelmeuli/action-maven-publish@v1
41- with :
42- maven_profiles : " release"
43- gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
44- gpg_passphrase : ${{ secrets.GPG_PASSPHRASE }}
45- nexus_username : ${{ secrets.OSSRH_USERNAME }}
46- nexus_password : ${{ secrets.OSSRH_TOKEN }}
39+ server-id : central
40+ server-username : MAVEN_USERNAME
41+ server-password : MAVEN_CENTRAL_TOKEN
42+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
43+ gpg-passphrase : MAVEN_GPG_PASSPHRASE
44+
45+ - name : Publish to Apache Maven Central
46+ run : mvn package deploy -Prelease
47+ env :
48+ MAVEN_USERNAME : ${{ secrets.NEXUS_USERNAME }}
49+ MAVEN_CENTRAL_TOKEN : ${{ secrets.NEXUS_PASSWORD }}
50+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change 545545 </executions >
546546 </plugin >
547547 <plugin >
548- <groupId >org.sonatype.plugins </groupId >
549- <artifactId >nexus-staging -maven-plugin</artifactId >
550- <version >${nexus-staging-maven-plugin.version} </version >
548+ <groupId >org.sonatype.central </groupId >
549+ <artifactId >central-publishing -maven-plugin</artifactId >
550+ <version >0.8.0 </version >
551551 <extensions >true</extensions >
552552 <configuration >
553- <serverId >ossrh</serverId >
554- <nexusUrl >https://oss.sonatype.org/</nexusUrl >
555- <autoReleaseAfterClose >true</autoReleaseAfterClose >
553+ <publishingServerId >central</publishingServerId >
554+ <tokenAuth >true</tokenAuth >
555+ <autoPublish >true</autoPublish >
556+ <waitUntil >published</waitUntil >
556557 </configuration >
557558 </plugin >
558559 </plugins >
You can’t perform that action at this time.
0 commit comments