diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4aabd0cf..fa31ecbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,9 @@ name: build & publish -on: push +on: + push: + branches: [master] + pull_request: + types: [opened, reopened, synchronize] permissions: contents: write # Required for creating releases and tags @@ -40,6 +44,19 @@ jobs: name: dist path: dist/ + all-tests-passed: + name: All tests passed + runs-on: ubuntu-latest + needs: [test, build] + if: always() + steps: + - name: Check test/build job status + run: | + if [ "${{ needs.test.result }}" != "success" ] || [ "${{ needs.build.result }}" != "success" ]; then + echo "test or build job did not succeed" + exit 1 + fi + check_version: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest