green icon indicating copy to clipboard operation
green copied to clipboard

Move Release Process to GitHub Actions

Open CleanCut opened this issue 2 years ago • 6 comments

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 run currently does.
    • Test all currently-supported stable versions of CPython, as well as the latest stable pypy3. (make run just looks at currently-installed stuff, but that's what I intended to have installed whenever I did a release)
  • 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.

CleanCut avatar Dec 15 '23 19:12 CleanCut

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.

sodul avatar Jan 08 '24 22:01 sodul

Do you need anything from me to enable this?

CleanCut avatar Jan 19 '24 01:01 CleanCut

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/

sodul avatar Jan 19 '24 22:01 sodul

✅ Done!

Image

Image

CleanCut avatar Jan 19 '24 22:01 CleanCut

I created the corresponding environments.

Image

CleanCut avatar Jan 19 '24 22:01 CleanCut

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.

sodul avatar Jan 19 '24 22:01 sodul

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/

sodul avatar Feb 15 '24 16:02 sodul