Skip to content

Commit a905896

Browse files
committed
ci(release): add docs/workflow for releasing
Signed-off-by: Vaughn Dice <vdice@akamai.com>
1 parent 95373e6 commit a905896

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: v*
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
environment: pypi
11+
# Using OIDC/Trusted Publisher: https://docs.pypi.org/trusted-publishers/using-a-publisher/
12+
permissions:
13+
id-token: write
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Build distribution
18+
run: |
19+
python -m venv venv
20+
source venv/bin/activate
21+
pip install --upgrade build
22+
python -m build
23+
24+
- name: Publish distribution to PyPI
25+
uses: pypa/gh-action-pypi-publish@release/v1.14

release-process.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Cutting a new release of the Spin Python SDK
2+
3+
To cut a new release, you will need to do the following:
4+
5+
1. Confirm that [CI is green](https://github.com/spinframework/spin-python-sdk/actions) for the commit selected to be tagged and released.
6+
7+
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.
8+
9+
1. Checkout the commit with the version bump from above.
10+
11+
1. Create and push a new tag with a `v` and then the version number.
12+
13+
As an example, via the `git` CLI:
14+
15+
```
16+
# Create a GPG-signed and annotated tag
17+
git tag -s -m "Spin Python SDK v3.1.0" v4.1.0
18+
19+
# Push the tag to the remote corresponding to spinframework/spin-python-sdk (here 'origin')
20+
git push origin v4.1.0
21+
```
22+
23+
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
24+
25+
1. If applicable, create PR(s) or coordinate [documentation](https://github.com/spinframework/spin-docs) needs, e.g. for new features or updated functionality.

0 commit comments

Comments
 (0)