Skip to content

Commit

Permalink
Merge pull request #195 from phobson/bump-version
Browse files Browse the repository at this point in the history
document release process more; reactive GHAs on tag push
  • Loading branch information
phobson authored Oct 8, 2024
2 parents ab9c0e1 + ce8d3d6 commit dada0a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on:
workflow_dispatch:
push:
tags: # Pattern matched against refs/tags
- 'v*/release' # Push events to every that ends in /release

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/python-publish-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Publish Python 🐍 distribution 📦 to TestPyPI

on:
workflow_dispatch:
push:
tags: # Pattern matched against refs/tags
- 'v*/test' # Push events to every that ends in /test

jobs:
build:
Expand Down
11 changes: 7 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,17 @@ python check_wqio.py

## Releases

*First*, you need to bump all of the versions like in [this PR](https://github.com/International-BMP-Database/wqio/pull/194).

After that is pushed/merged/fetched, it's time to tag the test and final releases.
There are two Github actions that are run when tags are pushed.
The first builds and uploads to TestPyPI if the tag is in the form `v<major>.<minor>.<micro>/*/test`.

The second builds, uploads to PyPI, then signs the release and creates a Github release with a bunch of different assets if the tag is in the form `v<major>.<minor>.<micro>/release`.

To execute the builda, create a new tag ends with e.g., `/test` (i.e., `v0.6.3/test`) and push that.
To execute the builds, create a new tag ends with e.g., `/test` (i.e., `v0.6.3/test`) and push that.

If that works, create Yet Another tag that ends with `/release` (i.e., `v0.6.3/release`) and push that.
If that works, create Yet Another Tag that ends with `/release` (i.e., `v0.6.3/release`) and push that.

All in all, that workflow looks like this:

Expand All @@ -62,9 +65,9 @@ All in all, that workflow looks like this:
git switch main
git fetch upstream
git merge --ff-only upstream/main
git tag -a "v0.6.4/test" # add comment in text editor
git tag -a "v0.6.4/test" # adjust version + add comment in text editor
git push upstream --tags
# watch, wait for CI to sucessfully build on TestPyPI
git tag -a "v0.6.4/release" # add comment in text editor
git tag -a "v0.6.4/release" # adjust version + add comment in text editor
# watch, wait for CI to sucessfully build on actual PyPI
```

0 comments on commit dada0a9

Please sign in to comment.