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:
-
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
- We'll need to add
-
Add automation to download artifacts and upload them to PyPI via Trusted Publishing
- This may need refactoring to move all the wheel building to the same workflow (but separate jobs), and then a final job that runs when the wheels have all been built, that builds sdist, checks and uploads them all.
- See /~https://github.com/ultrajson/ultrajson/blob/main/.github/workflows/deploy.yml and /~https://github.com/ultrajson/ultrajson/actions/workflows/deploy.yml for examples.
- We also have https://test.pypi.org/project/Pillow/ which we can use to verify the upload machinery is working smoothly before release. For example, we can upload for non-tagged wheel builds.
Thoughts?