From d6ab75ca4908398bf36b0e22bba3aad5a3dc7eb9 Mon Sep 17 00:00:00 2001 From: Madalin Ilie Date: Mon, 18 Sep 2023 14:31:47 +0300 Subject: [PATCH] Change actions order to pack first and release after --- .github/workflows/release-to-maven-central.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-to-maven-central.yml b/.github/workflows/release-to-maven-central.yml index 856f353a1..ea5ebc80e 100644 --- a/.github/workflows/release-to-maven-central.yml +++ b/.github/workflows/release-to-maven-central.yml @@ -14,6 +14,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set projects Maven version to GitHub Action GUI set version + run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" + + - name: Build with Maven + run: mvn -B package --file pom.xml -DskipTests=true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up Apache Maven Central uses: actions/setup-java@v3 with: @@ -25,13 +33,9 @@ jobs: gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase - - name: Set projects Maven version to GitHub Action GUI set version - run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" - - name: Publish to Apache Maven Central - run: mvn -B clean deploy -Psign --file pom.xml -DskipTests=true + run: mvn -B deploy -Psign --file pom.xml env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME}} MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file