Skip to content

Commit

Permalink
Merge pull request #11 from grove693/feature/github-actions-publish-m…
Browse files Browse the repository at this point in the history
…aven-v2

Modify git hub action to publish to maven central via central portal
  • Loading branch information
ilvalerione authored Oct 6, 2024
2 parents d4b8f11 + 1d3df0e commit 9189129
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
publish:
runs-on: ubuntu-latest
env:
MAVEN_OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
steps:
Expand All @@ -17,11 +17,11 @@ jobs:
- name: Set up Java environment for building and publishing to Maven Central
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_OSSRH_USERNAME
server-password: MAVEN_OSSRH_PASSWORD
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ env.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Clean and build project
Expand Down
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,32 +150,9 @@
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</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>

<profiles>
<profile>
<id>release</id>
Expand Down

0 comments on commit 9189129

Please sign in to comment.