Skip to content

release: enable PyPI Trusted Publisher #9

Description

@Q00

Goal

Publish contractplane without storing a long-lived registry token.

Current state

  • GitHub prerelease v0.1.0a1 is published with wheel and sdist.
  • A fresh install from the GitHub tag succeeds.
  • PyPI project contractplane does not exist yet.
  • The available local UV_PUBLISH_TOKEN is scoped to another project and correctly receives HTTP 403 for contractplane.

One-time PyPI setup

Create a Pending Trusted Publisher for:

  • owner: Q00
  • repository: contractplane
  • workflow: release.yml
  • environment: pypi (recommended)

Then add an OIDC publish job to .github/workflows/release.yml with only id-token: write, an environment gate, version/tag/test checks, and uv publish --trusted-publishing always. Keep the existing SHA-pinned Actions and never add a PyPI token secret.

Backfill

Build from tag v0.1.0a1, verify artifact hashes against the GitHub release, publish the same wheel/sdist to PyPI, and confirm a fresh pip install contractplane==0.1.0a1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions