Skip to content

feat(release): PyPI Trusted Publishing on tag push (#1951)#1986

Open
mvillmow wants to merge 1 commit into
mainfrom
1951-pypi-trusted-publishing
Open

feat(release): PyPI Trusted Publishing on tag push (#1951)#1986
mvillmow wants to merge 1 commit into
mainfrom
1951-pypi-trusted-publishing

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

Summary

pyproject.toml advertised PyPI-ready metadata (hatchling, classifiers, scripts, urls) but no publish workflow existed — pip install scylla did not work.

This PR closes the gap by adding PyPI Trusted Publishing (OIDC) to release.yml:

  • Build sdist + wheel via pypa/build (artifact uploaded for inspection, 7-day retention)
  • Publish to PyPI via pypa/gh-action-pypi-publish@release/v1 using OIDC — no PYPI_API_TOKEN secret required
  • TestPyPI dry-run job gated on workflow_dispatch with testpypi=true input
  • docs/dev/release.md documents the one-time PyPI project setup step-by-step

Workflow changes

Job Trigger Description
build tag push v* Builds sdist + wheel, uploads artifact
publish-pypi tag push v* (after build) Publishes to PyPI via OIDC, environment pypi
publish-testpypi workflow_dispatch + testpypi=true Publishes to TestPyPI for smoke-testing

One-time setup required (outside this PR)

A maintainer must:

  1. Create the scylla project on PyPI (and TestPyPI for dry runs)
  2. Configure Trusted Publishing: owner=HomericIntelligence, repo=ProjectScylla, workflow=release.yml, environment=pypi
  3. Create GitHub environments named pypi and testpypi in repo Settings

See docs/dev/release.md for the complete step-by-step instructions.

Security

  • No PYPI_API_TOKEN or other credentials are referenced in the workflow
  • id-token: write permission is scoped only to the publish jobs
  • pypa/gh-action-pypi-publish is pinned to a specific commit SHA

Closes #1951

🤖 Generated with Claude Code

#1951)

release.yml now builds sdist+wheel and publishes to PyPI via
pypa/gh-action-pypi-publish using OIDC (no API token required).
TestPyPI dry-run available via workflow_dispatch. One-time PyPI
project setup documented in docs/dev/release.md.

Resolves the gap where pyproject.toml advertised PyPI-ready metadata
but no publish workflow existed.

Closes #1951

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mvillmow mvillmow enabled auto-merge (squash) May 12, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Audit] §12 MAJOR: No PyPI publishing despite hatchling + classifiers indicating intent

1 participant