Description
The PyPI publish GitHub Action uploads your Python distribution packages from the dist/ directory to PyPI. It is the GitHub Action maintained by the Python Packaging Authority, and the project calls it the blessed action. Its main usage is trusted publishing, which lets a workflow authenticate to PyPI without a stored API token or a username and password. To use it, your project's publisher must first be configured on PyPI. The workflow job then needs the id-token: write permission, and the action must be used without an explicit username or password. The README notes that trusted publishing cannot be used from inside a reusable workflow, and it suggests calling the reusable workflow from a separate job in a non-reusable workflow. API tokens and username and password login are still available for other setups.…
Highlights
- Uploads dist/ packages to PyPI
- Trusted publishing with OIDC
- No stored API token needed
- Pin to release/v1 or a tag
- Maintained by PyPA
Ratings & Reviews
No ratings yet
Be the first to rate GH Action Pypi Publish.
People also visit
GH Action Pypi Publish FAQ
What does the action do?
It uploads the distribution packages in your dist/ directory to PyPI.
Do I need an API token?
Not with trusted publishing. The workflow needs the id-token: write permission and no username or password, and the publisher must be configured on PyPI first.
Can I use it in a reusable workflow?
Trusted publishing cannot be used from inside a reusable workflow. The README suggests calling it from a separate job in a non-reusable workflow.
Which version should I pin?
The master branch has been sunset. The README recommends release/v1, an exact tag, or a full commit SHA with Dependabot.
Who maintains it?
The Python Packaging Authority (PyPA).
What are the best GH Action Pypi Publish alternatives?
Popular alternatives to GH Action Pypi Publish include Create Pull Request, Create Github App Token and Add And Commit. See all GH Action Pypi Publish alternatives








