diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 210ef460..f98bb00a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,12 +8,9 @@ on: release: types: [published] -env: - PUBLISH: ${{ github.event_name == 'release' && github.event.action == 'published' }} - jobs: build: - if: ${{ env.PUBLISH }} + if: ${{ github.event_name == 'release' && github.event.action == 'published' }} name: build runs-on: ubuntu-latest @@ -41,6 +38,8 @@ jobs: if: ${{ !cancelled() }} needs: [build] runs-on: ubuntu-latest + env: + PUBLISH: ${{ github.event_name == 'release' && github.event.action == 'published' }} strategy: matrix: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] @@ -91,7 +90,7 @@ jobs: ./tests/test_pipe_asdf.sh upload: - if: ${{ env.PUBLISH }} + if: ${{ github.event_name == 'release' && github.event.action == 'published' }} needs: [build, tests] environment: pypi permissions: