From c9dc15776ac03c3cca7189b0b7852b280bf10d27 Mon Sep 17 00:00:00 2001 From: Igor Dianov Date: Mon, 6 Nov 2023 12:11:41 -0800 Subject: [PATCH] split mvn build/verify and deploy into separate steps for maven-build-and-tag action --- .github/actions/maven-build-and-tag/action.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/actions/maven-build-and-tag/action.yml b/.github/actions/maven-build-and-tag/action.yml index 5a3749c1d..e98f4567e 100644 --- a/.github/actions/maven-build-and-tag/action.yml +++ b/.github/actions/maven-build-and-tag/action.yml @@ -182,11 +182,21 @@ runs: echo "testcontainers.reuse.enable=true" > ~/.testcontainers.properties echo "TESTCONTAINERS_RYUK_DISABLED=true" >> $GITHUB_ENV - - name: Build and Test with Maven (and maybe Deploy) + - name: Build and Test with Maven shell: bash run: | - mvn -T1C de.qaware.maven:go-offline-maven-plugin:resolve-dependencies ${{ env.MAVEN_CLI_OPTS}} ${{ inputs.extra-maven-opts }} - mvn ${{ steps.define_maven_command.outputs.command }} ${{ env.MAVEN_CLI_OPTS}} ${{ inputs.extra-maven-opts }} + mvn -T1C de.qaware.maven:go-offline-maven-plugin:resolve-dependencies ${{ env.MAVEN_CLI_OPTS}} + mvn install ${{ env.MAVEN_CLI_OPTS}} ${{ inputs.extra-maven-opts }} + env: + MAVEN_CLI_OPTS: ${{ steps.compute-maven-options.outputs.result }} -Dlogging.root.level=off -Dspring.main.banner-mode=off -Ddocker.skip + MAVEN_USERNAME: ${{ inputs.maven-username }} + MAVEN_PASSWORD: ${{ inputs.maven-password }} + + - name: Maybe Deploy Maven Artifacts + if: steps.define_maven_command.outputs.command == 'deploy' + shell: bash + run: | + mvn deploy:deploy ${{ env.MAVEN_CLI_OPTS}} -DskipTests env: MAVEN_CLI_OPTS: ${{ steps.compute-maven-options.outputs.result }} -Dlogging.root.level=off -Dspring.main.banner-mode=off -Ddocker.skip MAVEN_USERNAME: ${{ inputs.maven-username }}