indygreg / python-build-standalone

Produce redistributable builds of Python
BSD 3-Clause "New" or "Revised" License
1.71k stars 107 forks source link

Add a release workflow to GitHub Actions #257

Open charliermarsh opened 2 months ago

charliermarsh commented 2 months ago

Summary

This PR moves the release workflow to GitHub Actions, which removes the need for wrangling PATs and other access controls locally.

Specifically, we now have a "Release" workflow that runs via workflow_dispatch, and accepts the commit SHA and the tag as arguments. You can run the workflow on a specific branch, which defaults to main, so the commit on which the release workflow runs does not need to match the commit being released, which IMO is a nice property.

The workflow is idempotent, such that it's safe to re-run with the same commit and tag if the release has already started, or completed, or failed partway through.

There's also a "dry-run" mode that avoids creating the release or uploading any artifacts. (If the release does exist, it will go a bit "further" in the process.)

Closes #253. Closes #256.

Test Plan

This took an embarrassing amount of trial and error, but feels pretty good now.