Fix PyPI publish workflow never triggering - #12
Merged
Conversation
release.yml creates GitHub releases using the default GITHUB_TOKEN, whose events don't cascade to trigger other workflows. As a result publish.yml's `release: published` trigger has never fired in the repo's history despite releases being created successfully - every PyPI release so far (0.5.1, 0.6.1, 0.6.2) was published manually. Trigger publish.yml directly off the version tag push (same trigger release.yml uses) so it runs reliably, and add a tag/pyproject.toml version check to guard against publishing a mismatched version. Signed-off-by: chrishayuk <chrishayuk@googlemail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release.ymlcreates GitHub releases using the defaultGITHUB_TOKEN. Events produced by that token don't cascade to trigger other workflows (a GitHub Actions anti-recursion safeguard), sopublish.yml'srelease: publishedtrigger has never fired — confirmed 0 runs of "Publish to PyPI" in the repo's entire Actions history, despite 3 successful releases (v0.5.1, v0.6.1, v0.6.2).publish.ymldirectly off thev*.*.*tag push (the same triggerrelease.ymlalready uses reliably), and add a tag-vs-pyproject.tomlversion check as a safety guard.Same fix already applied and verified working end-to-end on chuk-artifacts (IBM/chuk-artifacts#19).
Test plan
IBM/chuk-sessions, workflowpublish.yml, environmentpypi).