From 1b0ec9505f8c50a8b15663f5ef5f3712e8ff4cda Mon Sep 17 00:00:00 2001 From: jy95 Date: Sun, 12 Jan 2025 11:54:24 +0100 Subject: [PATCH] ci: prepare Maven Central release --- .github/workflows/maven-publish.yml | 4 +- pom.xml | 84 ++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 15 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index aad7208ea..dc624e5da 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -25,7 +25,7 @@ jobs: with: java-version: ${{ env.JAVA_VERSION }} distribution: ${{ env.DISTRIBUTION }} - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} @@ -33,7 +33,7 @@ jobs: # Publish package using the 'release' profile to exclude 'universal-coverage' - name: 📦 Publish package - run: mvn -P ossrh -B deploy + run: mvn -P central -B deploy env: MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} diff --git a/pom.xml b/pom.xml index bc77217ec..6dce94a90 100644 --- a/pom.xml +++ b/pom.xml @@ -163,19 +163,77 @@ - ossrh - - - ossrh - Central Repository OSSRH - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - Central Repository OSSRH - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - + central + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + central + true + true + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + verify + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.2 + + + attach-javadoc + + jar + + + + + java + none + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + + + --pinentry-mode + loopback + + + + +