[build] release python with trusted publishing#17421
Conversation
Review Summary by QodoImplement trusted publishing for Python PyPI releases
WalkthroughsDescription• Implement trusted publishing for Python releases via PyPI OIDC • Separate Python build and publish into dedicated workflow jobs • Remove Python from general language matrix for independent handling • Update workflow dependencies to include new publish-python job File Changes1. .github/workflows/release.yml
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Selenium release workflow so Python is published to PyPI via PyPI “trusted publishing” (GitHub OIDC) rather than via the existing Bazel reusable publish workflow.
Changes:
- Removes Python from the main
publishmatrix job. - Adds a dedicated
build-pythonjob to produce wheel/sdist artifacts via Bazel. - Adds a dedicated
publish-pythonjob that publishes those artifacts to PyPI usingpypa/gh-action-pypi-publish@release/v1, and wires downstream jobs to depend on it.
Reminder: after changing GitHub workflow YAML, run ./go format (CI will check formatting/linting).
Fixes #16082
💥 What does this PR do?
Python has not been publishing via CI for some reason, I tried a few ways to address it and couldn't figure it out, so I think this is the approach we need. I already did the update on pypi.org so this should work.
🔧 Implementation Notes
The alternative is to do what Ruby did and add this to the bazel.yml, but I figured using the the github action would be better:
🤖 AI assistance
💡 Additional Considerations
Probably should add a comment in the rake task that
python:releaseis not used in CI for production releases🔄 Types of changes