diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 93150fc..98aa0e3 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -27,7 +27,10 @@ jobs: with: path: ~/protobuf-2.6.1-bin key: ${{ runner.os }}-protobuf - - name: Build protobuf binary + - name: Check if protobuf compiler binary is present + run: ls /home/runner/protobuf-2.6.1-bin/bin/protoc + - name: Build protobuf binary if needed + if: failure() # previous step failed - protoc file is not present run: | curl -L -O https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz tar xf protobuf-2.6.1.tar.gz @@ -37,15 +40,18 @@ jobs: make protoc make install - name: Configure ~/.m2/toolchains.xml file + if: always() run: | cp toolchains.xml ~/.m2/toolchains.xml - name: Build with Maven - test + if: always() run: mvn -B --file pom.xml verify # Ensure all artifacts build successfully before we attempt deploy in order to prevent partial deploys. env: MAVEN_REPO_USERNAME: build-pipeline MAVEN_REPO_PASSWORD: ${{ secrets.MAVEN_REPO_PASSWORD }} - name: Build with Maven - deploy + if: always() run: mvn -B --file pom.xml -DskipTests deploy # Now that all builds have completed, we can deploy all the artifacts. env: