diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index df05b47..c1cf1dd 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -18,10 +18,11 @@ jobs: - id: install-secret-key name: Install gpg secret key run: | - cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | base64 --decode > /tmp/private.key + gpg --batch --import /tmp/private.key gpg --list-secret-keys --keyid-format LONG - name: Publish package - run: mvn --batch-mode clean deploy + run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/pom.xml b/pom.xml index 33fe0ae..3ce485b 100644 --- a/pom.xml +++ b/pom.xml @@ -153,14 +153,15 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 true - ossrh - https://oss.sonatype.org/ - true + central + true + true + published @@ -169,11 +170,11 @@ ossrh - https://oss.sonatype.org/content/repositories/snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2 + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/