Skip to content

Automate build and release to PyPI #7390

Closed
@hugovk

Description

Currently the release process has many steps, including preparing things in this repo, and then starting a build in /~https://github.com/python-pillow/pillow-wheels, before downloading the sdist + wheel artifacts to disk, and manually uploading them to PyPI using twine.

I'd like us to move towards more automated releases, including using the new Trusted Publishers to upload wheels directly from the CI to PyPI, which is more secure:

We can do this in a phased manner, not all of these things would need to be done at once, to ensure we can still make releases with just some of them completed.

We could potentially deal with the Travis CI wheels later, and tackle GitHub Actions first as they're a bigger win and we don't know when Travis CI will go away.

Big picture:

  • Prepare release
  • Push a tag
  • The CI builds release artifacts
  • The CI uploads artifacts to PyPI

I'd suggest something along these lines:

  1. Move Linux and macOS /~https://github.com/python-pillow/pillow-wheels to this repo /~https://github.com/python-pillow/Pillow. We already have Windows wheels build here.

    • We'll need to add paths: / paths-ignore to workflows so we only trigger the main test workflows for "normal" code changes, and only trigger the wheel workflow for things like release and modifying its config
    • Upload wheels as GitHub artifacts in this repo instead
  2. Add automation to download artifacts and upload them to PyPI via Trusted Publishing

Thoughts?

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions