-
Notifications
You must be signed in to change notification settings - Fork 156
Enable PyPI publish workflow on version tag push #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| name: Build and upload to PyPI | ||
| on: | ||
| release: | ||
| types: [published] | ||
| push: | ||
| tags: | ||
| - "v[0-9]*.[0-9]*.[0-9]*" | ||
| - "[0-9]*.[0-9]*.[0-9]*" | ||
|
Comment on lines
+3
to
+6
|
||
|
|
||
| jobs: | ||
| build-and-publish: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag globs here are more permissive than the stated intent of only matching
vX.Y.Z/X.Y.Z. In GitHub Actions globbing,[0-9]*means “a digit followed by anything”, so tags likev1.2.3-rc1,v1.2.3.4, orv1.2.3foocan still match and trigger a publish. Consider adding an early validation step (e.g., shell regex check against^v?\d+\.\d+\.\d+$) to fail fast, or otherwise tightening the trigger so pre-release/suffixed tags don’t publish unintentionally.