Remove the release workflow that could never publish - #57
Merged
Conversation
release.yml built the package on a v* tag push and then tried to upload it with trusted publishing and no environment. Its OIDC claims cannot match the PyPI publisher, which is configured for python-publish.yml with the pypi environment, so every run failed with invalid-publisher. The v1.3.5 run was the first, and the workflow did not exist as of v1.3.4. The failure also hid the release step: Create GitHub Release came after the upload in the same job, so a tag push produced no release at all. Dropping just the upload step would have been worse than leaving it. A release created by a workflow using GITHUB_TOKEN does not raise the release: published event, so python-publish.yml would not have started and the tag would have produced a release with nothing on PyPI. Every release so far, 1.3.2 through 1.3.5, was published by a user creating the GitHub release and python-publish.yml picking it up. That path works and is unchanged here, so the workflow is removed rather than repaired, which also matches mcp-semclone. CONTRIBUTING.md now documents the steps, including why the release has to be created by a user and how to verify the upload past the cached PyPI endpoint.
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.
Problem
release.ymltriggered on av*tag push, built the package, then uploaded it withpypa/gh-action-pypi-publishand noenvironment:. The PyPI trusted publisher for this project is configured forpython-publish.ymlwith thepypienvironment, so the claims fromrelease.ymlcould never match:The v1.3.5 run was the first time this workflow ran at all. It did not exist as of the v1.3.4 tag, having arrived later with the workflow standardization changes.
The failure had a second effect that made it look worse than a failed upload:
Create GitHub Releasewas a later step in the same job, so a tag push produced no GitHub release either.Why remove it instead of fixing the upload
Dropping only the upload step and keeping the release creation would have been worse than the current state. A release created by a workflow using
GITHUB_TOKENdoes not raise therelease: publishedevent, sopython-publish.ymlwould not start. A tag push would then produce a GitHub release with nothing published to PyPI, and the failure would be silent rather than red.Making the upload work from
release.ymlinstead would need a second trusted publisher entry on PyPI for that workflow, which is duplicate configuration for a path that is already covered.Releases 1.3.2 through 1.3.5 were all published by a user creating the GitHub release, with
python-publish.ymlpicking up the event. Every release is user-authored, none bygithub-actions[bot], and all have zero attached assets, confirmingrelease.ymlnever created one. That path works and is untouched here.This also matches
SemClone/mcp-semclone, which has norelease.ymland publishes reliably.Changes
.github/workflows/release.yml.CONTRIBUTING.md, which had no release section: version bump, tag,gh release create --generate-notes. Records why step 3 has to be a user action, and that the upload should be verified against the version-specific PyPI endpoint since the aggregate one is cached and lags.Publishing behaviour is unchanged.
python-publish.yml,test.yml,pr-validation.ymlandlicense-check.ymlare untouched, and nothing referencedrelease.yml.Note
The same
release.ymlpattern, PyPI upload with no environment, is present inpurl2notices,purl2srcandupmex, where its runs also fail, and inossnotices, where it has never run. Those are out of scope here.