ci: switch to PyPI Trusted Publishing (OIDC)#114
Merged
Conversation
Replace API token-based authentication with OpenID Connect trusted publishing. This eliminates the need for stored PyPI secrets and improves supply chain security. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ad-m
pushed a commit
that referenced
this pull request
Mar 7, 2026
Remove manual twine upload step from development docs and add trusted publishing changelog entry (PR #114). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ad-m
added a commit
that referenced
this pull request
Mar 7, 2026
* Fix obsolete and invalid documentation across the project Update outdated references (setup.py → pyproject.toml, TravisCI → GitHub Actions), fix broken example file links, correct typos and grammar in README and Sphinx docs, update copyright year range, fix geckodriver/chromedriver naming confusion in Makefile, update contact email in CODE_OF_CONDUCT.md, and add comprehensive changelog entries for all changes since 1.0.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Update release docs for trusted publishing via GitHub Actions Remove manual twine upload step from development docs and add trusted publishing changelog entry (PR #114). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add documentation for context manager, on_check callback, and ImageToTextTask inputs Document three recently added features that were missing usage examples: - Context manager support on AnticaptchaClient - on_check callback parameter on Job.join() - ImageToTextTask accepting file paths and raw bytes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Adam Dobrawy <naczelnik@jawne.info.pl> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
actions/checkout@v4,actions/setup-python@v5,pypa/gh-action-pypi-publish@release/v1)python -m buildinstead ofsetup.py sdist bdist_wheelManual setup steps required
Before this workflow will work, the following manual configuration is needed:
1. Create GitHub Environments
In the repository Settings > Environments, create two environments:
pypi- for publishing to production PyPItestpypi- for publishing to Test PyPI2. Configure Trusted Publishers on PyPI
On PyPI:
python-anticaptchaprojectad-mpython-anticaptchapublish.ymlpypi3. Configure Trusted Publishers on TestPyPI
On TestPyPI:
testpypi4. Remove old secrets
Once trusted publishing is verified working, remove the now-unused repository secrets:
pypi_passwordtest_pypi_passwordRecommended hardening
v*or*) to prevent accidental publishes from branchesmaster: Require pull request reviews and status checks before merging, to prevent unauthorized tag creationv*) so only maintainers can create release tagsrelease/v1for even stronger supply-chain security (e.g.,pypa/gh-action-pypi-publish@<full-sha>)pypa/gh-action-pypi-publishsupports attestations via Sigstore; consider enablingattestations: truefor additional package provenanceTest plan
pypi,testpypi) as described abovepypi_passwordandtest_pypi_passwordsecretsGenerated with Claude Code