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
python: update PyPI publishing example #32146
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: William Woodruff <[email protected]>
Thanks for submitting a PR to the GitHub Docs project! In order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, see the documentation. |
Signed-off-by: William Woodruff <[email protected]>
I created this PR from an organization fork, which (AFAICT) don't support this kind of access. I'm happy to add anybody who reviews here as a collaborator to the fork, however 🙂 |
Automatically generated comment ℹ️This comment is automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
fpt: Free, Pro, Team |
Signed-off-by: William Woodruff <[email protected]>
For more information about the starter workflow, see [`python-publish`](https://github.com/actions/starter-workflows/blob/main/ci/python-publish.yml). | ||
For more information about this workflow, including the PyPI settings | ||
needed, see [AUTOTITLE](/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi). |
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.
NB: This removes the link to the starter workflow, since it's also currently out-of-date. I'll send a PR updating it as well.
Linkchecks are failing, for reasons that I don't fully understand:
As best I can tell, that's the correct path component for the OIDC page, per https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi Edit: the previews also render the link correctly, so I'm guessing this is a CI issue. |
Signed-off-by: William Woodruff <[email protected]>
@woodruffw Thanks so much for opening a PR, along with the accompanying context! I'll get this triaged for review ✨ |
Thank you @nguyenalex836! Let me know if I can help at all. |
Signed-off-by: William Woodruff <[email protected]>
FYI: I'd suggest blocking this on actions/starter-workflows#2345, since the two share the same sample workflow and should probably be consistent with each other 🙂 |
Why:
This updates the "Building and testing Python" guide to reflect the steps already documented in "Configuring OpenID Connect in PyPI", i.e. using Trusted Publishing to publish to PyPI rather than a manually configured API token.
(I don't have a linked issue for this, sorry! -- this was discussed in an email thread with @jhutchings1)
What's being changed (if available, include any code snippets, screenshots, or gifs):
I've changed the example PyPI publishing workflow to use Trusted Publishing instead of a manually configured secret. I've also tweaked the surrounding paragraphs slightly to include a link to the other GH docs page that references Trusted Publishing via OIDC, as well as to PyPI's own official docs for the feature.
Check off the following:
I have reviewed my changes in staging, available via the View deployment link in this PR's timeline (this link will be available after opening the PR).
data
directory.For content changes, I have completed the self-review checklist.