From a1bb635b8c7622b67fcfb639bd22ae601e2fba06 Mon Sep 17 00:00:00 2001 From: Cody Olsen Date: Fri, 4 Nov 2022 15:02:45 +0100 Subject: [PATCH] fix: if the build step fails release should halt --- .github/workflows/main.yml | 6 +++--- assets/inject/semver-workflow/.github/workflows/main.yml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bae0fe47..1d33cc2a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,9 +81,9 @@ jobs: - run: npm test release: - needs: test - # only run if opt-in during workflow_dispatch, and run if tests are skipped using the toggle, but not if they have failed - if: always() && github.event.inputs.release == 'true' && needs.test.result != 'failure' && needs.test.result != 'cancelled' + needs: [build, test] + # only run if opt-in during workflow_dispatch + if: always() && github.event.inputs.release == 'true' && needs.build.result != 'failure' && needs.test.result != 'failure' && needs.test.result != 'cancelled' runs-on: ubuntu-latest name: Semantic release steps: diff --git a/assets/inject/semver-workflow/.github/workflows/main.yml b/assets/inject/semver-workflow/.github/workflows/main.yml index c5eb0038..12f6ebbf 100644 --- a/assets/inject/semver-workflow/.github/workflows/main.yml +++ b/assets/inject/semver-workflow/.github/workflows/main.yml @@ -91,8 +91,9 @@ jobs: release: needs: test - # only run if opt-in during workflow_dispatch, and run if tests are skipped using the toggle, but not if they have failed - if: always() && github.event.inputs.release == 'true' && needs.test.result != 'failure' && needs.test.result != 'cancelled' + needs: [build, test] + # only run if opt-in during workflow_dispatch + if: always() && github.event.inputs.release == 'true' && needs.build.result != 'failure' && needs.test.result != 'failure' && needs.test.result != 'cancelled' runs-on: ubuntu-latest name: Semantic release steps: