FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add PyPI trusted publishing by adarshdigievo · Pull Request #37 · serpapi/serpapi-python · GitHub

feat: add PyPI trusted publishing - #37

Merged
adarshdigievo merged 1 commit into
masterfrom
feat/pypi-trusted-publishing
Jul 24, 2026
Merged

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

Conversation

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.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

ilyazub left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @adarshdigievo !

TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for switching to official solution.

adarshdigievo merged commit f0cc2fe into master Jul 24, 2026
8 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL