File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 # Dry-run triggers
55 pull_request :
66 branches :
7- - main
7+ - master
88 workflow_dispatch :
99 # Publish trigger: only when the PR merge commits are pushed to main
1010 push :
1111 branches :
12- - main
12+ - master
1313
1414permissions :
1515 contents : read # for checkout
2121 name : Dry-Run Build & Check
2222 runs-on : ubuntu-latest
2323
24- # Only on PRs or manual; skip on 'push to main'
25- if : ${{ github.event_name == 'pull_request ' || github.event_name == 'workflow_dispatch' }}
24+ # Allow dry-run on all events except when pushing to master
25+ if : github.event_name != 'push ' || github.ref != 'refs/heads/master'
2626 steps :
2727 - name : Check out code
2828 uses : actions/checkout@v4
4343 run : python -m twine check dist/*
4444
4545 - name : Upload build artifacts
46- uses : actions/upload-artifact@v3
46+ uses : actions/upload-artifact@v4
4747 with :
4848 name : built-package
4949 path : dist/*
5353 runs-on : ubuntu-latest
5454 needs : dry-run
5555
56- # Only fire on the push-to-main that completes the PR
57- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
56+ # Only fire on the push-to-master that completes the PR
57+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
5858 steps :
5959 - name : Check out code
6060 uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments