Skip to content

Commit

Permalink
trigger pypi workflow only on main and build succeeds on main
Browse files Browse the repository at this point in the history
  • Loading branch information
omsh committed Jul 7, 2024
1 parent afb024b commit 0ca1f1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main'}}
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main' &&
github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down

0 comments on commit 0ca1f1d

Please sign in to comment.