gh-action-pypi-publish
Active·★ 1.2k·Updated 2026-10-02
★ Essential★ Trending
This GitHub Action facilitates uploading Python distribution packages from the `dist/` directory to PyPI. It primarily supports PyPI's trusted publishing implementation, enabling secure authentication without explicit API tokens or credentials.
#GitHub Actions#PyPI#Python#CI/CD#Trusted Publishing#Coding
01
Features
01Upload Python distribution packages to PyPI.
02Supports PyPI's trusted publishing via OpenID Connect (OIDC).
03Generates and uploads digital attestations for packages.
04Allows publishing to custom registries like TestPyPI.
05Provides options to customize package directory and handle duplicates.
02
Compatibility
GitHub Actions Ubuntu VM
Native
Verified via docs
GNU/Linux Docker Environments (within GitHub Actions)
Supported
Verified via docs
GitHub Actions Container Jobs ('container:' keyword)
Not Supported (Risky)
Verified via docs
Self-hosted GitHub Actions Runners
Partial Support (Best Effort)
Verified via docs
Trusted Publishing in Reusable Workflows
Unsupported
Verified via docs
GitHub Actions Composite Actions
Unsupported
Verified via docs
03
Quick start
1
$ uses: pypa/gh-action-pypi-publish@release/v1
04
Use cases
↳Automatically publish Python distribution packages to PyPI as part of a CI/CD pipeline.
↳Securely upload packages using PyPI's trusted publishing (OIDC) without manual token management.
↳Publish packages to alternative Python package indexes such as TestPyPI.
05
Alternatives
Comments
Log in to leave a comment
No comments yet. Be the first!