Move Release Process to GitHub Actions
It is time to move the release process from my local machine to GitHub actions.
- Trigger the action manually (via workflow_dispatch)
- Do the equivalent of what
make runcurrently does.- Test all currently-supported stable versions of CPython, as well as the latest stable pypy3. (
make runjust looks at currently-installed stuff, but that's what I intended to have installed whenever I did a release)
- Test all currently-supported stable versions of CPython, as well as the latest stable pypy3. (
- We should use Actions secrets for the PyPI credentials. PyPI supports GitHub OpenID Connect. I will need to configure the credentials in PyPI and store them in the Actions secrets for the repository.
This is a prerequisite for @sodul to gain publishing privileges.
Thanks for granting me maintainer status for green on pipy.org.
I'm looking at https://github.com/marketplace/actions/pypi-publish to handle the releases. The nice thing is that no secret should need to be added which should keep things safe.
I will probably update the 3.5.0 release to use this action.
Do you need anything from me to enable this?
Yes, easiest for you is to grant me ownership on GH and Pypi.org so I can setup Trusted publishing as only owner, not maintainers, can do it. You can switch me back to maintainer afterwards.
Alternatively you can follow the instructions to add the GH project as a trusted source, it seems relatively simple but I have never done it: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
✅ Done!
I created the corresponding environments.
Thanks, I was planning on working on the python 3.12.1 compatibility issue this weekend so I can try this at the same time.
It worked like charm: https://github.com/CleanCut/green/releases/tag/4.0.1 https://github.com/CleanCut/green/actions/runs/7919259574 https://pypi.org/project/green/4.0.1/