File tree Expand file tree Collapse file tree 3 files changed +31
-24
lines changed Expand file tree Collapse file tree 3 files changed +31
-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 @@ -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 544544 </executions >
545545 </plugin >
546546 <plugin >
547- <groupId >org.sonatype.plugins </groupId >
548- <artifactId >nexus-staging -maven-plugin</artifactId >
549- <version >${nexus-staging-maven-plugin.version} </version >
547+ <groupId >org.sonatype.central </groupId >
548+ <artifactId >central-publishing -maven-plugin</artifactId >
549+ <version >0.8.0 </version >
550550 <extensions >true</extensions >
551551 <configuration >
552- <serverId >ossrh</serverId >
553- <nexusUrl >https://oss.sonatype.org/</nexusUrl >
554- <autoReleaseAfterClose >true</autoReleaseAfterClose >
552+ <publishingServerId >central</publishingServerId >
553+ <tokenAuth >true</tokenAuth >
554+ <autoPublish >true</autoPublish >
555+ <waitUntil >published</waitUntil >
555556 </configuration >
556557 </plugin >
557558 </plugins >
You can’t perform that action at this time.
0 commit comments