File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI
22
33on :
4+ push :
5+ branches : [main]
46 pull_request :
57 branches : [main]
68 workflow_call :
Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- push :
4+ # Build dev package after CI passes on main (no duplicate test runs)
5+ workflow_run :
6+ workflows : ["CI"]
7+ types : [completed]
58 branches : [main]
69 release :
710 types : [published]
1720 PYTHON_TARGETS : " -i 3.10 -i 3.11 -i 3.12 -i 3.13 -i 3.14"
1821
1922jobs :
20- ci :
21- uses : ./.github/workflows/ci.yml
22-
2323 linux :
24- needs : ci
24+ # Skip if triggered by workflow_run and CI failed
25+ if : >-
26+ github.event_name != 'workflow_run' ||
27+ github.event.workflow_run.conclusion == 'success'
2528 runs-on : ${{ matrix.runner }}
2629 strategy :
2730 matrix :
8689 path : dist
8790
8891 macos :
89- needs : ci
92+
9093 runs-on : ${{ matrix.runner }}
9194 strategy :
9295 matrix :
@@ -130,7 +133,7 @@ jobs:
130133 path : dist
131134
132135 windows :
133- needs : ci
136+
134137 runs-on : windows-latest
135138 steps :
136139 - uses : actions/checkout@v4
@@ -171,7 +174,7 @@ jobs:
171174 path : dist
172175
173176 sdist :
174- needs : ci
177+
175178 runs-on : ubuntu-latest
176179 steps :
177180 - uses : actions/checkout@v4
@@ -188,7 +191,7 @@ jobs:
188191 # Upload to Test PyPI on every push to main
189192 release-test-pypi :
190193 name : Publish to test.pypi.org
191- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
194+ if : github.event_name == 'workflow_run' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
192195 needs : [linux, macos, windows, sdist]
193196 runs-on : ubuntu-latest
194197 environment : release-test-pypi
You can’t perform that action at this time.
0 commit comments