Skip to content

Commit

Permalink
can't use env at job level :(
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarrison committed Nov 15, 2023
1 parent dc9dd3b commit 0a09da4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"]
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 0a09da4

Please sign in to comment.