Skip to content

Commit

Permalink
Issue #16: Use OSSRH publishing instructions
Browse files Browse the repository at this point in the history
This reverts commit e4e15d2
  • Loading branch information
ALRubinger committed Nov 14, 2024
1 parent fb4621b commit 9b34390
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
--settings .maven_settings.xml \
-DreleaseVersion=$version \
-DdevelopmentVersion=$nextVersion \
-P central,sign-artifacts
-P ossrh,sign-artifacts
env:
SIGN_KEY_PASS: ${{ secrets.GPG_SECRET_PASSPHRASE }}
SIGN_KEY: ${{ secrets.GPG_SECRET_KEY }}
Expand Down
7 changes: 6 additions & 1 deletion .maven_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
<password>${env.ARTIFACTORY_PASSWORD}</password>
</server>
<server>
<id>central</id>
<id>ossrh-snapshots</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
<server>
<id>ossrh-releases</id>
<username>${env.SONATYPE_USERNAME}</username>
<password>${env.SONATYPE_PASSWORD}</password>
</server>
Expand Down
26 changes: 19 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -432,22 +432,34 @@
</build>
</profile>
<profile>
<!-- https://central.sonatype.org/publish/publish-portal-maven/ -->
<id>central</id>
<!-- https://central.sonatype.org/publish/publish-maven/#deployment -->
<id>ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
<serverId>ossrh-releases</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<!-- Sonatype's OSSRH - replicates to Maven Central within 30min of publish -->
<repository>
<id>ossrh-releases</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>

Expand Down

0 comments on commit 9b34390

Please sign in to comment.