Skip to content

Commit 18ab596

Browse files
test workflow
1 parent 8f295ab commit 18ab596

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

.github/workflows/publish-to-maven.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ name: Java with Maven
55
on:
66
release:
77
types: [published]
8+
push:
9+
branches:
10+
- task/*
811

912
jobs:
1013
build:
@@ -17,7 +20,7 @@ jobs:
1720
with:
1821
java-version: '8'
1922
distribution: 'adopt'
20-
server-id: ossrh
23+
server-id: central
2124
server-username: MAVEN_USERNAME
2225
server-password: MAVEN_PASSWORD
2326
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
@@ -38,6 +41,6 @@ jobs:
3841
run: |
3942
mvn -B clean ${{env.PACK_CMD}}
4043
env:
41-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
42-
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
44+
MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
45+
MAVEN_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
4346
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333

3434
<distributionManagement>
3535
<repository>
36-
<id>ossrh</id>
37-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
36+
<id>central</id>
37+
<url>https://central.sonatype.com/api/v1/publisher/deployments/</url>
3838
</repository>
3939
</distributionManagement>
4040

@@ -252,14 +252,14 @@
252252
</configuration>
253253
</plugin>
254254
<plugin>
255-
<groupId>org.sonatype.plugins</groupId>
256-
<artifactId>nexus-staging-maven-plugin</artifactId>
257-
<version>1.6.13</version>
255+
<groupId>org.sonatype.central</groupId>
256+
<artifactId>central-publishing-maven-plugin</artifactId>
257+
<version>0.8.0</version>
258258
<extensions>true</extensions>
259259
<configuration>
260-
<serverId>ossrh</serverId>
261-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
262-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
260+
<publishingServerId>central</publishingServerId>
261+
<tokenAuth>true</tokenAuth>
262+
<autoPublish>true</autoPublish>
263263
</configuration>
264264
</plugin>
265265
</plugins>

0 commit comments

Comments
 (0)