diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 626d628..06a213b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -44,24 +44,26 @@ jobs:
files: |
staging/*.jar
- publish:
- needs: build-and-release
- runs-on: ubuntu-latest
- environment: production
- steps:
- - uses: actions/checkout@v4
- - name: Set up Maven Central Repository
- uses: actions/setup-java@v3
- with:
- java-version: '8'
- distribution: 'temurin'
- cache: 'maven'
-
- - name: Publish to the Maven Central Repository
- uses: samuelmeuli/action-maven-publish@v1
- with:
- maven_args: '-DskipTests'
- gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
- gpg_passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- nexus_username: ${{ secrets.OSSRH_USERNAME }}
- nexus_password: ${{ secrets.OSSRH_TOKEN }}
\ No newline at end of file
+ publish:
+ needs: build-and-release
+ runs-on: ubuntu-latest
+ environment: production
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK 8
+ uses: actions/setup-java@v4
+ with:
+ java-version: '8'
+ distribution: 'temurin'
+ cache: 'maven'
+ server-id: central
+ server-username: CENTRAL_USERNAME
+ server-password: CENTRAL_PASSWORD
+ gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
+ gpg-passphrase: GPG_PASSPHRASE
+ - name: Deploy to Sonatype Central
+ run: mvn clean deploy -DskipTests -B
+ env:
+ CENTRAL_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ CENTRAL_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index df27383..0b58d2b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,20 +120,8 @@
-
-
-
- ossrh
- https://s01.oss.sonatype.org/content/repositories/snapshots
-
-
- ossrh
- https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
-
-
-
@@ -153,17 +141,6 @@
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.13
- true
-
- ossrh
- https://s01.oss.sonatype.org/
- true
-
-
org.apache.maven.plugins
@@ -218,13 +195,17 @@
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.0.0-M7
+ org.sonatype.central
+ central-publishing-maven-plugin
+ 0.4.0
+ true
+
+ central
+ true
+ published
+
-