Skip to content

Commit

Permalink
No issue: Avoid building twice by including the deploy in the build s…
Browse files Browse the repository at this point in the history
…tep and ask to deploy at end only
  • Loading branch information
reckart committed Dec 20, 2024
1 parent 941cf26 commit 8f0c0f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8f0c0f9

Please sign in to comment.