Skip to content

Commit dcc7917

Browse files
authored
Update publish conditions in workflow
Refine conditions for publishing wheels to PyPI and GH Release.
1 parent f288e4c commit dcc7917

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish2.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,14 @@ jobs:
221221
name: "Publish all wheels to PyPI + GH Release"
222222
needs: [build-wheels, build-noarch]
223223
runs-on: ubuntu-latest
224+
if: |
225+
startsWith(inputs.ref, 'v') &&
226+
!cancelled() &&
227+
(needs.build-wheels.result == 'success' || needs.build-wheels.result == 'failure') &&
228+
needs.build-noarch.result == 'success'
224229
# Only publish when ref looks like a version tag (v3.1.1, v2.5.0, etc.).
225230
# Running from main, a branch, or a bare SHA -> skipped automatically.
226-
if: startsWith(inputs.ref, 'v')
231+
if: startsWith(inputs.ref, 'v') && !cancelled()
227232
permissions:
228233
contents: write # required to upload assets to the GH Release
229234
id-token: write # required for PyPI trusted publishing (OIDC)

0 commit comments

Comments
 (0)