From 191e4002503483b55a93c0fda3d67778fe0541ed Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Mon, 13 Apr 2026 16:05:29 -0600 Subject: [PATCH] ci(release): add docs/workflow for releasing Signed-off-by: Vaughn Dice Co-authored-by: Joel Dice --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ release-process.md | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 release-process.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f7f33cf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + tags: v* + +jobs: + release: + runs-on: ubuntu-latest + environment: pypi + # Using OIDC/Trusted Publisher: https://docs.pypi.org/trusted-publishers/using-a-publisher/ + permissions: + id-token: write + steps: + - uses: actions/checkout@v6 + + - name: Build distribution + run: | + python -m venv venv + source venv/bin/activate + pip install --upgrade build + python -m build + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1.14 diff --git a/release-process.md b/release-process.md new file mode 100644 index 0000000..98ea4d6 --- /dev/null +++ b/release-process.md @@ -0,0 +1,25 @@ +# Cutting a new release of the Spin Python SDK + +To cut a new release, you will need to do the following: + +1. Confirm that [CI is green](https://github.com/spinframework/spin-python-sdk/actions) for the commit selected to be tagged and released. + +1. If not already bumped, set the intended release version in [pyproject.toml](./pyproject.toml), create a pull request with these changes and merge once approved. + +1. Checkout the commit with the version bump from above. + +1. Create and push a new tag with a `v` and then the version number. + + As an example, via the `git` CLI: + + ``` + # Create a GPG-signed and annotated tag + git tag -s -m "Spin Python SDK v4.1.0" v4.1.0 + + # Push the tag to the remote corresponding to spinframework/spin-python-sdk (here 'origin') + git push origin v4.1.0 + ``` + +1. Pushing the tag upstream will trigger the [release action](https://github.com/spinframework/spin-python-sdk/actions/workflows/release.yml) which publishes the distribution to pypi.org + +1. If applicable, create PR(s) or coordinate [documentation](https://github.com/spinframework/spin-docs) needs, e.g. for new features or updated functionality. \ No newline at end of file