Skip to content

Commit 60cd094

Browse files
committed
build: upgrade maven central requirements
1 parent 7762079 commit 60cd094

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/maven-central.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ jobs:
3232
with: # running setup-java again overwrites the settings.xml
3333
java-version: 17
3434
distribution: 'temurin'
35-
server-id: ossrh
36-
server-username: OSSRH_USERNAME
37-
server-password: OSSRH_PASSWORD
35+
server-id: central
36+
server-username: CENTRAL_USERNAME
37+
server-password: CENTRAL_TOKEN
3838
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
3939
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4040

4141
- name: Publish to Maven Central
4242
run: mvn -pl '!tests' clean deploy -P bom,central,gradlePlugin
4343
env:
44-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
45-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
44+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
45+
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
4646
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

pom.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,16 +1851,15 @@
18511851
</executions>
18521852
</plugin>
18531853

1854-
<!-- Release plugin -->
1854+
<!-- Maven Central -->
18551855
<plugin>
1856-
<groupId>org.sonatype.plugins</groupId>
1857-
<artifactId>nexus-staging-maven-plugin</artifactId>
1858-
<version>${nexus-staging-maven-plugin.version}</version>
1856+
<groupId>org.sonatype.central</groupId>
1857+
<artifactId>central-publishing-maven-plugin</artifactId>
1858+
<version>0.8.0</version>
18591859
<extensions>true</extensions>
18601860
<configuration>
1861-
<serverId>ossrh</serverId>
1862-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
1863-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
1861+
<publishingServerId>central</publishingServerId>
1862+
<autoPublish>true</autoPublish>
18641863
</configuration>
18651864
</plugin>
18661865
</plugins>

0 commit comments

Comments
 (0)