Skip to content

Commit 9cd9915

Browse files
committed
OSSRH Migration
1 parent a9b798b commit 9cd9915

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,21 @@ jobs:
9090
distribution: liberica
9191
java-version: 17
9292
cache: maven
93+
server-id: central
94+
server-username: CENTRAL_USERNAME
95+
server-password: CENTRAL_PASSWORD
96+
gpg-private-key: ${{ secrets.SIGNING_KEY }}
97+
gpg-passphrase: GPG_PASSPHRASE
9398

9499
- name: Grant execute permission for mvnw
95100
run: chmod +x mvnw
96101

97102
- name: Release Maven package
98-
uses: samuelmeuli/action-maven-publish@v1
99-
with:
100-
gpg_private_key: ${{ secrets.SIGNING_KEY }}
101-
gpg_passphrase: ${{ secrets.SIGNING_PASSWORD }}
102-
nexus_username: ${{ secrets.OSSRH_USERNAME }}
103-
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
103+
run: mvn -B -e -ntp -Pdeploy deploy
104+
env:
105+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
106+
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
107+
GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }}
104108

105109
- name: Upload reports
106110
if: failure()

pom.xml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@
107107
</execution>
108108
</executions>
109109
</plugin>
110+
<plugin>
111+
<groupId>org.sonatype.central</groupId>
112+
<artifactId>central-publishing-maven-plugin</artifactId>
113+
<version>0.8.0</version>
114+
<extensions>true</extensions>
115+
<configuration>
116+
<publishingServerId>central</publishingServerId>
117+
<autoPublish>true</autoPublish>
118+
</configuration>
119+
</plugin>
110120
</plugins>
111121
</build>
112122
</profile>
@@ -140,17 +150,6 @@
140150
</execution>
141151
</executions>
142152
</plugin>
143-
<plugin>
144-
<groupId>org.sonatype.plugins</groupId>
145-
<artifactId>nexus-staging-maven-plugin</artifactId>
146-
<version>${nexus-staging-plugin.version}</version>
147-
<extensions>true</extensions>
148-
<configuration>
149-
<serverId>ossrh</serverId>
150-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
151-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
152-
</configuration>
153-
</plugin>
154153
<plugin>
155154
<groupId>org.codehaus.mojo</groupId>
156155
<artifactId>versions-maven-plugin</artifactId>

0 commit comments

Comments
 (0)