# pypa/gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI, the tokenless way: https://github.com/marketplace/actions/pypi-publish

Repository: https://github.com/pypa/gh-action-pypi-publish
Canonical: https://ross.abutalabs.com/products/gh-action-pypi-publish
Homepage: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: github-action, python, workflow, workflow-automation, pypi, python-packaging, twine, secrets, upload, release, release-automation, release-helper, workflows, github-actions, pypa-guide, github-actions-python, actions, testpypi, hacktoberfest, oidc
Last push: 2026-07-29T17:03:45+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 2716, "days_push": 35, "days_rel": 35, "gap_med": 21.5, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1184, forks 120 (observed 2026-08-28T04:03:54.761886+00:00)

## What it is
The official PyPA GitHub Action for publishing Python distribution packages to PyPI and TestPyPI directly from CI/CD workflows. It supports tokenless authentication via PyPI's Trusted Publishing (OIDC) as well as traditional API token and username/password methods.

## Use cases
- publish python package to pypi from github actions
- upload dist files to pypi in ci
- tokenless pypi publishing with oidc
- automate python package releases
- publish to testpypi for testing
- release python package without storing api tokens

## When to choose
- You want to publish Python packages to PyPI or TestPyPI from GitHub Actions workflows
- You want to avoid managing long-lived API tokens by using OIDC-based Trusted Publishing
- You want the officially supported PyPA-recommended publishing action

## When to avoid
- You need to publish from a reusable workflow with trusted publishing (not currently supported; use tokens instead)
- You publish to non-PyPI package indexes with custom authentication flows
- You need highly customized publishing scenarios outside the supported usage patterns

## Facets
- artifact type: plugin
- maturity: active
- function: deployment, ci-cd, package-manager, secrets-management, workflow-automation
- domain: developer-tools
- platform: python, cloud
- tags: pypi, trusted-publishing, oidc, github-action, release-automation, twine, python-packaging, tokenless-authentication, testpypi, automation, github-actions

## Member repositories
- pypa/gh-action-pypi-publish (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.761886+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:24:29.488201+00:00, confidence not recorded.
  - readme: https://github.com/pypa/gh-action-pypi-publish (fetched 2026-08-28T04:03:54.761886+00:00, sha 5a4196f4da62)
- Data as of 2026-08-30T08:39:29.467469+00:00.
