Publish to PyPI using Trusted Publishers by hugovk · Pull Request #94 · python/cherry-picker

Conversation

@hugovk

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:

Mariatta


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

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

Mariatta

Mariatta

Mariatta

Mariatta

Mariatta

Mariatta

hugovk

@hugovk hugovk left a comment

Loading

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 <Mariatta@users.noreply.github.com>

Mariatta

@hugovk hugovk deleted the trusted-publisher branch

October 12, 2023 08:14

This was referenced

Oct 12, 2023

This was referenced

Nov 12, 2023

2 participants

@hugovk @Mariatta