Commit 548a8d9
fix(ci): restrict PyPI publish to release events and manual triggers (#477)
Changes the PyPI publishing workflow to run only on:
1. Release published events (not drafts) - using 'release: types: [published]'
2. Manual workflow_dispatch with version input
Removes the 'push: tags:' trigger that ran on any tag push.
This provides better control over when PyPI packages are published:
- Releases can be prepared as drafts without triggering publish
- Only finalized releases trigger automatic publishing
- Manual override available via workflow_dispatch when needed
Updated version detection logic:
- Extracts version from github.event.release.tag_name for releases
- Strips 'v' prefix if present
- Falls back to workflow_dispatch version input
- Errors if neither source is available
Co-authored-by: Claude Sonnet 4.5 <[email protected]>1 parent 18540ff commit 548a8d9
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
| 59 | + | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments