Repository navigation
ci: build release distributions without publishing to PyPI - #50
Closed
vpanchal-supra wants to merge 1 commit into
Closed
vpanchal-supra wants to merge 1 commit into
vpanchal-supra wants to merge 1 commit into
Conversation
Releases are now uploaded to PyPI by hand, so the tag workflow no longer needs a trusted publisher or a `pypi` environment. Rename publish.yaml to release.yaml and drop the publish job. The workflow still checks the tag against the project version and the master branch, builds the distributions and uploads them as the run's `dist` artifact. Rewrite RELEASING.md for the manual flow: PyPI role and project-scoped token, downloading the run's artifact, twine check, uv publish, and the GitHub release.
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.
We decided to publish releases to PyPI by hand. The tag workflow no longer needs a PyPI trusted publisher or a
pypienvironment, and neither was set up.This PR introduces the following:
.github/workflows/publish.yamltorelease.yaml("Release build") and removes thepublishjob, so the workflow no longer hasid-token: write, thepypienvironment or the PyPI publish action. Thebuildjob is unchanged: on av*tag it checks that the tag matches the version inpyproject.tomland that the commit is onmaster, builds the distributions and uploads them as the run'sdistartifact.RELEASING.mdfor the manual flow:supra-sdkPyPI project, an API token scoped to the project, and bypass access to therelease-tagstag ruleset.distartifact of the tag's run withgh run download, check it withtwine check, upload it withuv publish, then create the GitHub release with both files attached.dist/files should not be uploaded, that PyPI never accepts a file name twice, and that uploads with an API token carry no attestations.Before releasing
0.2.0, someone who can bypass therelease-tagsruleset has to push thev0.2.0tag. The ruleset blocksv*tag creation for everyone else.