Skip to content

Commit c5926f7

Browse files
committed
chore: update release configuration for Maven Central compatibility
1 parent c60d461 commit c5926f7

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ jobs:
88
steps:
99
- uses: actions/checkout@v3
1010
- name: Set up Maven Central Repository
11-
uses: actions/setup-java@v2
11+
uses: actions/setup-java@v3
1212
with:
1313
java-version: '8'
14-
distribution: 'adopt'
15-
server-id: ossrh
16-
server-username: MAVEN_USERNAME
17-
server-password: MAVEN_PASSWORD
14+
distribution: 'temurin'
15+
cache: maven
1816
- id: install-secret-key
1917
name: Install gpg secret key
2018
run: |
@@ -24,4 +22,6 @@ jobs:
2422
env:
2523
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
2624
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
27-
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy
25+
CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }}
26+
CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
27+
run: mvn --batch-mode --errors -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P release clean deploy

pom.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,26 +252,25 @@
252252
</configuration>
253253
</plugin>
254254
<plugin>
255-
<groupId>org.sonatype.plugins</groupId>
256-
<artifactId>nexus-staging-maven-plugin</artifactId>
257-
<version>1.6.12</version>
255+
<groupId>org.sonatype.central</groupId>
256+
<artifactId>central-publishing-maven-plugin</artifactId>
257+
<version>0.4.0</version>
258258
<extensions>true</extensions>
259259
<configuration>
260-
<serverId>ossrh</serverId>
261-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
262-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
260+
<publishingServerId>central</publishingServerId>
261+
<tokenAuth>true</tokenAuth>
263262
</configuration>
264263
</plugin>
265264
</plugins>
266265
</build>
267266
<distributionManagement>
268267
<snapshotRepository>
269-
<id>ossrh</id>
270-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
268+
<id>central</id>
269+
<url>https://central.sonatype.com/api/v1/publisher/upload</url>
271270
</snapshotRepository>
272271
<repository>
273-
<id>ossrh</id>
274-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
272+
<id>central</id>
273+
<url>https://central.sonatype.com/api/v1/publisher/upload</url>
275274
</repository>
276275
</distributionManagement>
277276
</profile>

0 commit comments

Comments
 (0)