diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d895cf..10908f2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,10 @@ jobs: git config --global user.email "123456+github-actions[bot]@users.noreply.github.com" - name: Publish to Apache Maven Central - run: mvn clean -Darguments=-DskipTests release:prepare release:perform -DreleaseVersion=${{github.event.inputs.version}} -Prelease + run: | + mvn clean install -DskipTests + mvn versions:set -DnewVersion=${{github.event.inputs.version}} + mvn clean deploy -DskipTests -Prelease env: MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/pom.xml b/pom.xml index 97acb87..3119edd 100644 --- a/pom.xml +++ b/pom.xml @@ -129,6 +129,38 @@ release + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.6.3 + + + attach-javadocs + + jar + + + none + false + + + + + org.apache.maven.plugins maven-gpg-plugin @@ -144,14 +176,13 @@ - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.9.0 true - ${nexus.url} - central - true + central + true