Skip to content

Commit eae13af

Browse files
Mlaz-codeclaude
andcommitted
ci(publish): add workflow_dispatch for gate dry-runs
Lets operators manually trigger publish.yml to exercise the test → publish gate without cutting a real release. The actual PyPI upload step is guarded with `if: github.event_name == 'release'`, so a workflow_dispatch run builds, tests the matrix, and reaches the publish job but skips the upload itself. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9cecf63 commit eae13af

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Publish to PyPI
33
on:
44
release:
55
types: [published]
6+
# workflow_dispatch lets operators dry-run the test matrix + gate
7+
# wiring without cutting a real release (the actual PyPI upload step
8+
# is guarded against non-release triggers, see below). Useful for
9+
# verifying the gate after edits to test.yml or publish.yml.
10+
workflow_dispatch:
611

712
jobs:
813
# Re-run the full test matrix on the tagged commit before publish.
@@ -50,4 +55,7 @@ jobs:
5055
run: hatch build
5156

5257
- name: Publish to PyPI
58+
# Only publish on an actual release event. workflow_dispatch
59+
# runs through test+build as a dry run but must not upload.
60+
if: github.event_name == 'release'
5361
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)