Skip to content

Commit

Permalink
switch to central publish
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Mar 5, 2024
1 parent 070558e commit b179dd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
Expand All @@ -32,7 +32,7 @@ jobs:
run: mvn clean install

- name: Deploy to Central
run: mvn deploy -P sonatype
run: mvn deploy -P central
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
Expand Down
26 changes: 8 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</distributionManagement>
</profile>
<profile>
<id>sonatype</id>
<id>central</id>
<build>
<plugins>
<plugin>
Expand All @@ -147,29 +147,19 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.4.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
<autoPublish>true</autoPublish>
<deploymentName>HSCore</deploymentName>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>

0 comments on commit b179dd4

Please sign in to comment.