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 29
29
java-version : 17
30
30
distribution : temurin
31
31
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
32
37
33
38
- name : Change version to release version
34
39
# Assume that RELEASE_VERSION will have form like: "v1.0.1". So we cut the "v"
@@ -37,15 +42,12 @@ jobs:
37
42
env :
38
43
RELEASE_VERSION : ${{ github.event.release.tag_name }}
39
44
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 }}
49
51
50
52
# This is separate job because there were issues with git after release step, was not able to commit changes.
51
53
update-working-version :
Original file line number Diff line number Diff line change @@ -33,14 +33,18 @@ jobs:
33
33
- name : Set up Java and Maven
34
34
uses : actions/setup-java@v4
35
35
with :
36
- distribution : temurin
37
36
java-version : 17
37
+ distribution : temurin
38
38
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 544
544
</executions >
545
545
</plugin >
546
546
<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 >
550
550
<extensions >true</extensions >
551
551
<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 >
555
556
</configuration >
556
557
</plugin >
557
558
</plugins >
You can’t perform that action at this time.
0 commit comments