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

Publish to PyPI using Trusted Publishers #94

Merged
merged 3 commits into from
Oct 12, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 11, 2023

Switch to PyPI's Trusted Publishers for more secure upload.

  • First, format pyproject.toml for easy comparison with other projects.

  • Switch backend to hatch with the hatch_vcs plugin to enable publishing to Test PyPI.

  • Add new deploy workflow using https://github.com/hynek/build-and-inspect-python-package to confirm we can build packages and inspect as desired. Done for all runs, but not uploaded yet.

  • Upload to Test PyPI on every commit on main.

  • Upload to real PyPI on GitHub Releases.

  • Remove old release job.

TODO:


# Upload to real PyPI on GitHub Releases.
release-pypi:
name: Publish released package to pypi.org
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be consistent with the previous job name.
Since we used Test PyPI before, we can use PyPI here instead of pypi.org

Copy link
Member Author

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(oops, this was meant to be a commit messages)

Co-authored-by: Mariatta <[email protected]>
@hugovk hugovk merged commit 38fcdad into python:main Oct 12, 2023
22 checks passed
@hugovk hugovk deleted the trusted-publisher branch October 12, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants