From 8f0c0f91ae4b004a90113a2be2d87758d94c3ff4 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Fri, 20 Dec 2024 12:20:55 +0100 Subject: [PATCH] No issue: Avoid building twice by including the deploy in the build step and ask to deploy at end only --- .github/workflows/maven.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a450621fd..404467ba3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -50,12 +50,13 @@ jobs: run: echo "CACHE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - name: Build with Maven + if: matrix.os != 'ubuntu-latest' run: mvn --show-version --batch-mode --no-transfer-progress clean verify - - - name: Upload to Nexus + + - name: Build with Maven and upload to Nexus if: matrix.os == 'ubuntu-latest' env: # `NEXUS_USERNAME` and `NEXUS_PASSWORD` are used in `~/.m2/settings.xml` created by `setup-java` action NEXUS_USERNAME: ${{ secrets.NEXUS_USER }} NEXUS_PASSWORD: ${{ secrets.NEXUS_PW }} - run: mvn --show-version --batch-mode --errors --no-transfer-progress deploy + run: mvn --show-version --batch-mode --errors --no-transfer-progress -DdeployAtEnd=true clean deploy