Skip to content

feat: add PyPI trusted publishing#37

Open
adarshdigievo wants to merge 1 commit into
masterfrom
feat/pypi-trusted-publishing
Open

feat: add PyPI trusted publishing#37
adarshdigievo wants to merge 1 commit into
masterfrom
feat/pypi-trusted-publishing

Conversation

@adarshdigievo

Copy link
Copy Markdown
Member

This PR modernizes the release process by replacing long-lived PyPI API tokens with PyPI Trusted Publishing.

  • This is now the recommended way to publish Python packages and prevents the risks of long-lived PyPI API tokens.
  • Trusted publishing uses GitHub Actions OIDC for secure authentication.

Changes made:

  • Replaced token-based PyPI publishing with OIDC Trusted Publishing using the protected pypi GitHub environment.
  • Removed the PYPI_API_TOKEN requirement
  • Added Python 3.14 to the CI and release test matrices and moved example tests to Python 3.14.
  • PyPI account setup for trusted publishing is already completed. The workflow will run starting with the next release, with no further configuration needed on the GitHub repo or PyPI.
image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s GitHub Actions workflows to publish releases to PyPI via Trusted Publishing (OIDC) instead of a long-lived PyPI API token, and expands CI/release testing to include Python 3.14.

Changes:

  • Switch PyPI publishing in the release workflow from twine + PYPI_API_TOKEN to pypa/gh-action-pypi-publish with OIDC and a protected pypi environment.
  • Add Python 3.14 to CI and release matrices, and run example tests on 3.14.
  • Update README publishing docs to remove the PYPI_API_TOKEN secret requirement.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
README.md Removes PYPI_API_TOKEN from documented required secrets, aligning docs with OIDC trusted publishing.
.github/workflows/release.yml Adds Python 3.14 to the release test matrix and switches publishing to OIDC trusted publishing (with pypi environment + id-token).
.github/workflows/ci.yml Adds Python 3.14 to CI matrix and moves example tests to run on 3.14.
Comments suppressed due to low confidence (1)

.github/workflows/release.yml:23

  • actions/checkout@v6 and actions/setup-python@v6 are not valid major versions. Use the current supported major versions so the workflow doesn’t fail at runtime (checkout v7, setup-python v5).
      - uses: actions/checkout@v6

      - uses: actions/setup-python@v6
        with:
          python-version: ${{ matrix.python-version }}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants