Skip to content

Commit

Permalink
fix: if the build step fails release should halt
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Nov 4, 2022
1 parent f81e2c8 commit a1bb635
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 3 additions & 2 deletions assets/inject/semver-workflow/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a1bb635

Please sign in to comment.