Open
Conversation
9951163 to
0c40f41
Compare
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.
Add two more GHA workflows to handle building the release distributions and publishing them to GitHub and PyPI.
This makes it MUCH easier to build and publish packages straight from GitHub. It is also arguably more secure, since it utilizes PyPI's Trusted Publishing method. That alleviates project maintainers from having to generate and secure long-lived API keys. Those API keys then become prime targets for exfiltration via malware. Using GHA WFs to publish releases is more secure and auditable.
This makes it much easier for maintainers to release new versions than relying on a single (or few) trusted project admin or owner. IMO, trusting maintainers to publish packages via pushing tags is not any more of a security risk than letting them maintain the codebase to begin with, so this doesn't require any additional trust in project maintainers than normal. Usually projects have a bottleneck of people who have permissions to release new versions to PyPI, and this alleviates that bottleneck.
With this PR, the developer experience goes like this:
django.ymlv-> release workflow inrelease.ymlis runpyproject.tomlthen:softprops/action-gh-releaseGHA is run, which creates a draft release on GitHub with the two distribution files attachedpublish.ymlis runpypa/gh-action-pypi-publishGHAA few things to note:
Relevant links: