ci: use OIDC trusted publishing and SHA-pin pypi-publish in release.yml - #64
Open
farhan wants to merge 1 commit into
Open
ci: use OIDC trusted publishing and SHA-pin pypi-publish in release.yml#64farhan wants to merge 1 commit into
farhan wants to merge 1 commit into
Conversation
Replace token-based PyPI auth (user/password with PYPI_UPLOAD_TOKEN) with OIDC trusted publishing, and pin pypa/gh-action-pypi-publish to a verified commit SHA instead of the floating @release/v1 ref. A floating ref on this action previously caused a production incident, so SHA-pinning is required. OIDC removes the need for a long-lived PyPI token. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
=======================================
Coverage 82.17% 82.17%
=======================================
Files 48 48
Lines 1419 1419
Branches 110 110
=======================================
Hits 1166 1166
Misses 221 221
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
release.ymlPart of openedx/public-engineering#506
Summary
user: __token__/password: ${{ secrets.PYPI_UPLOAD_TOKEN }}inputs.pypa/gh-action-pypi-publishtodc37677b2e1c63e2034f94d8a5b11f265b73ba33(v1.14.2) instead of the floating@release/v1ref.Why
pypa/gh-action-pypi-publishpreviously caused a production incident, so SHA-pinning this action is required.Important Notes
release.yml, and thepublish_to_pypijob.PYPI_UPLOAD_TOKENis no longer used and can be removed from repo secrets.Testing Notes
Validated with
actionlintand a YAML parse. Not exercised end-to-end (release runs only on push tomain). Repo-owner should confirm the trusted publisher is configured before merge.🤖 Generated with Claude Code