ADR Suggestion Use PyPI Trusted Publishing via GitHub Actions
#52
AndrewSazonov
started this conversation in
Ideas
Replies: 1 comment
-
|
No-brainer addition. Let's do it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when publishing Python packages to PyPI from GitHub CI, we usually rely on personal API tokens or passwords stored as GitHub secrets. I suggest switching to PyPI Trusted Publishing instead.
Trusted Publishing uses OpenID Connect (OIDC) and allows PyPI to trust GitHub Actions directly. This means:
This setup needs to be done once per project on PyPI.
Configuration steps
Add a new publisher: Select GitHub Actions and fill in:peasy-lib,diffraction-lib, etc.pypi-publish.ymlResult
After this is configured, the
pypi-publish.ymlworkflow (added to the repository via the Copier templates) will automatically publish the package to PyPI whenever a new GitHub release is created.Beta Was this translation helpful? Give feedback.
All reactions