diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03b8788..5bf79fe 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: Release new version to Maven on: release: - type: [published] + types: [published] jobs: publish: @@ -15,12 +15,14 @@ jobs: with: java-version: 11 distribution: 'zulu' - server_id: ossrh-nexus - server-username: ${{ secrets.OSSRH_USERNAME }} - server-password: ${{ secrets.OSSRH_PASSWORD }} + server-id: ossrh-nexus + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD gpg-private-key: ${{ secrets.GPG_KEY }} - gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} - - name: Verify the pom.xml - run: mvn verify + gpg-passphrase: GPG_PASSPHRASE - name: Publish to the Maven Central Repository - run: mvn clean deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: mvn deploy --batch-mode -D skipTests --activate-profiles release --no-transfer-progress diff --git a/pom.xml b/pom.xml index 42e214f..d2c7d62 100644 --- a/pom.xml +++ b/pom.xml @@ -187,4 +187,32 @@ + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + \ No newline at end of file