Skip to content

Commit

Permalink
env context not available in if
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmkenney committed Oct 11, 2023
1 parent 8566f8e commit 0c47ad9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ on:
pull_request:
branches: [main]

env:
REPO_OWNER: MDAnalysis
REPO_NAME: PathSimAnalysis
PACKAGE_NAME: pathsimanalysis

jobs:
# Build the packacge and upload the resulting distribution
# as an artifact to later be used during deployment to
# PyPI
build:
name: "Build $PACKAGE_NAME"
if: github.repository == ${{ env.REPO_OWNER}}/${{ env.REPO_NAME }}
if: github.repository == ${{ vars.REPO_OWNER}}/${{ vars.REPO_NAME }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -60,7 +55,7 @@ jobs:
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
github.repository == ${{ env.REPO_OWNER }}/${{ env.REPO_NAME }} &&
github.repository == ${{ vars.REPO_OWNER }}/${{ vars.REPO_NAME }} &&
github.event_name != "pull_request"
needs:
- build
Expand All @@ -83,7 +78,7 @@ jobs:
publish-to-testpypi:
name: "Publish $PACKAGE_NAME to TestPyPI"
if: |
github.repository == ${{ env.REPO_OWNER }}/${{ env.REPO_NAME }} &&
github.repository == ${{ vars.REPO_OWNER }}/${{ vars.REPO_NAME }} &&
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags/') &&
github.event_name != "pull_request"
Expand Down

0 comments on commit 0c47ad9

Please sign in to comment.