-
Notifications
You must be signed in to change notification settings - Fork 1
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
[deploy] use Trusted Publisher instead of API token #17
Conversation
WalkthroughThe pull request modifies the GitHub Actions workflow for publishing a Python package. The changes simplify the workflow configuration by removing detailed comments and updating the deployment process. The workflow now includes a specific PyPI environment and adjusts permissions for package publication, likely transitioning to a more modern authentication method for package uploads. Changes
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/publish.yml (1)
Line range hint
42-42
: Consider pinning to a specific version for better stability.While using
@release/v1
works, pinning to a specific version (e.g.,@v1.8.1
) would provide better stability and predictability for your deployment pipeline.- uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@v1.8.1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/publish.yml
(2 hunks)
🔇 Additional comments (3)
.github/workflows/publish.yml (3)
15-17
: LGTM! Environment configuration aligns with Trusted Publisher requirements.The environment configuration is correctly set up for PyPI's Trusted Publisher feature, providing better security through OIDC.
18-19
: LGTM! Correct permissions for PyPI Trusted Publisher.The
id-token: write
permission is correctly configured for OIDC authentication with PyPI's Trusted Publisher feature.
Line range hint
1-42
: Verify PyPI Trusted Publisher configuration.While the workflow changes are correct, ensure that you have:
- Added GitHub as a trusted publisher in your PyPI account settings
- Configured the following publishing requirements in PyPI:
- Repository owner:
capcom6
- Repository name: current repository name
- Workflow name:
Upload Python Package
- Environment:
pypi
🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
Summary by CodeRabbit