-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Upgrade PyPI upload workflow to use Trusted Publishing (#4589) #4611
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
base: main
Are you sure you want to change the base?
Conversation
|
Cool - TIL there is something more official than what I long ago cooked up at a GitHub conference when Actions were announced. Let's make CI happy and this feels the right way to go to me. I'll be copying for my other projects too :) |
|
Happy to hear that, please feel free to use across. It's quite impressive that you were there during the announcement of Actions. It seems that there is an issue with the CI workflow in the PR. The diff-shades-comment job is failing because it cannot find the .pr-comment.json artifact. This artifact is expected by the comment-details command in the diff_shades_gha_helper.py script. I've reviewed the script and it seems like the artifact is not being generated or uploaded in the diff-shades workflow. |
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.
CI seems to be working here - Is it just failing locally for you?
This looks good - I would imagine our next test run of this would confirm? Should we force run the skipped tests maybe?
Thoughts here other maintainers?
|
This seems fine but it will need some changes on the PyPI side; I'll do that when I have some time. Not sure if @cooperlees has the requisite permissions. |
| - name: Build wheel and source distributions | ||
| run: python -m build |
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.
Please avoid building in the same job as publishing. Especially with the elevated OIDC privileges. The transitive build deps shouldn't have such level of access.
#4589 links to proper examples.
Fixes #4589
This PR upgrades the PyPI publishing workflow to use Trusted Publishing instead of token-based authentication. This change:
Changes made:
id-token: writepermission for OIDC authenticationpypa/gh-action-pypi-publishactionRequired actions after merging:
The repository maintainers will need to: