Skip to content

Publish releases with PyPI trusted publishing #12

Open

Description

@VianneyMI

Context

Version 0.1.0 was uploaded from a laptop with account-wide API tokens for TestPyPI and PyPI. Release documentation is tracked in #11.

Goal

Upload releases from a GitHub Actions workflow with short-lived OpenID Connect credentials, removing stored API tokens from the process.

Scope

  • A release.yml workflow triggered by a published GitHub release. It builds with uv build, runs twine check --strict, and uploads with uv publish --trusted-publishing always from a GitHub environment named pypi.
  • A trusted publisher registered for the existing python-jev project on PyPI (repository VianneyMI/python-jev, workflow file name and environment name), and the same on TestPyPI.
  • Revoke the API tokens used for 0.1.0.
  • Describe the process in the release documentation (Document the release process and keep a changelog #11).

Completion criteria

  • A release uploads to PyPI from the workflow without any stored token.

Activity

  1. added
    infrastructure
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions