-
-
Notifications
You must be signed in to change notification settings - Fork 25
Switch PyPi to OIDC authentication #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 modernizes the PyPI publishing workflow by switching from password-based authentication to OIDC (OpenID Connect) trusted publishing, which is a more secure and maintainable approach.
Key changes:
- Split the workflow into two jobs:
release-build(builds artifacts) andpypi-publish(publishes to PyPI) - Replaced manual
twine uploadwith the officialpypa/gh-action-pypi-publishaction - Added OIDC permissions (
id-token: write) for secure authentication
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | ||
| - uses: actions/upload-artifact@v5 |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatched artifact action versions. The workflow uses actions/upload-artifact@v5 for uploading but actions/download-artifact@v6 for downloading. These should use matching major versions to ensure compatibility. Either use @v5 for both or @v6 for both.
| - uses: actions/upload-artifact@v5 | |
| - uses: actions/upload-artifact@v6 |
| name: Release | ||
| on: | ||
| release: | ||
| types: [published] |
Copilot
AI
Nov 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The addition of workflow_dispatch trigger enables manual workflow execution, but there's no documentation or comment explaining why this trigger was added or when it should be used. Consider adding a comment to clarify the intended use case for manual triggering.
| types: [published] | |
| types: [published] | |
| # Allows maintainers to manually trigger the release workflow if an automated release event fails or a release needs to be published outside the normal process. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 97.63% 97.76% +0.12%
==========================================
Files 17 17
Lines 805 805
==========================================
+ Hits 786 787 +1
+ Misses 19 18 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.