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# Versioning commits with message "Update package version".
55# The commit pushes to main, re-triggering this workflow for Phase 2.
66#
7- # Phase 2 (sentinel commit): Lint + Test → Publish to PyPI + GitHub Release
7+ # Phase 2 (sentinel commit): Publish to PyPI + GitHub Release
8+ # Skips Lint + Test since the code is identical to Phase 1.
89
910name : Push to main
1011
@@ -20,8 +21,9 @@ permissions:
2021 id-token : write
2122
2223jobs :
23- # ── Shared gates (always run) ──────────── ─────────────────
24+ # ── Phase 1 gates (skip on sentinel commit) ─────────────────
2425 Lint :
26+ if : github.event.head_commit.message != 'Update package version'
2527 runs-on : ubuntu-latest
2628 steps :
2729 - uses : actions/checkout@v4
3335 run : ruff check .
3436
3537 Test :
38+ if : github.event.head_commit.message != 'Update package version'
3639 runs-on : macos-latest
3740 strategy :
3841 fail-fast : false
@@ -122,7 +125,6 @@ jobs:
122125 # ── Phase 2: Publish (only on sentinel commit) ────────────
123126 Publish :
124127 runs-on : ubuntu-latest
125- needs : [Lint, Test]
126128 if : github.event.head_commit.message == 'Update package version'
127129 env :
128130 GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 1+ Skip redundant Lint and Test in Phase 2 of push workflow since code is identical to Phase 1
You can’t perform that action at this time.
0 commit comments