Skip to content
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

Release to PyPI using Trusted Publishing #213

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 21, 2024

PyPI has introduced "Trusted Publishers", a method to release files from CI using OIDC and generated, short-lived tokens, rather than long-lived tokens on the developer's own machine. This is both safer, and makes releasing easier and more convenient.

https://docs.pypi.org/trusted-publishers/

This PR adds a workflow to deploy to PyPI for new GitHub releases.

It also deploys to Test PyPI on merges to main, to make sure the release machinery is well oiled.

I've set up the PyPIs.


PEP 740 ("Index support for digital attestations") introduces signatures which links the PyPI package to the GitHub repo, and helps users verify the source and authenticity of packages. This is only available with Trusted Publishing.

PyPI is still implementing support, but we can already start using it, which should also help them test out.

All we need to do to enable this is add:

        with:
          attestations: true

@hugovk hugovk added the changelog: Added For new features label Oct 21, 2024
@hugovk hugovk merged commit 82ca37d into python-humanize:main Oct 21, 2024
30 checks passed
@hugovk hugovk deleted the trusted-publishing branch October 21, 2024 18:34
@hugovk
Copy link
Member Author

hugovk commented Oct 21, 2024

@hugovk hugovk mentioned this pull request Oct 21, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Added For new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant