fix(ci): trigger PyPI publish after Release workflow completes#15
Merged
Conversation
…event - release: published fires as soon as a GitHub Release exists, even with no assets attached; manually creating a release (or a race with the build job) caused pypi.yml to run before artifacts were uploaded - switch trigger to workflow_run on Release completion so pypi.yml only runs after the build job has uploaded the wheel and sdist - gate on conclusion == success so a failed release build does not attempt a publish - resolve the tag from workflow_run.head_branch for the automatic path and from inputs.tag for the manual workflow_dispatch path
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: publishedfires the moment a GitHub Release exists, even before build artifacts are attached; a manually created release (or any race with the build job) causespypi.ymlto run with an emptydist/workflow_runon the Release workflow sopypi.ymlonly starts after the build has finished and uploaded the wheel/sdistconclusion == 'success'so a failed build never attempts a publishworkflow_run.head_branchfor the automatic path,inputs.tagforworkflow_dispatch