Skip to content

Commit 2e77f40

Browse files
Simplify C release process
Defer documentation to general admin
1 parent 38a5ac9 commit 2e77f40

3 files changed

Lines changed: 23 additions & 120 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release
1+
name: Publish C API release
22

33
on:
44
push:
@@ -14,46 +14,28 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v6.0.2
17-
- name: Set up Python
18-
uses: actions/setup-python@v6.1.0
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
1919
with:
20-
python-version: '3.12'
21-
- name: Install dependencies and set up venv
20+
version: "0.10.2"
21+
- name: Install system deps
2222
run: |
2323
sudo apt-get update
2424
sudo apt-get install -y ninja-build libcunit1-dev
25-
python -m venv venv
26-
source venv/bin/activate
27-
pip install meson
28-
- name: Build tarball and changelogs
25+
- name: Install meson
26+
run: uv tool install meson==1.10.1
27+
- name: Build tarball
2928
run: |
30-
source venv/bin/activate
3129
git rm -rf c/tests/meson-subproject
3230
git config --global user.email "CI@CI.com"
3331
git config --global user.name "Mr Robot"
3432
git add -A
3533
git commit -m "dummy commit to make meson not add in the symlinked directory"
3634
meson c build-gcc
3735
meson dist -C build-gcc
38-
python docs/convert_changelog.py c/CHANGELOG.rst > C-CHANGELOG.txt
39-
python docs/convert_changelog.py python/CHANGELOG.rst > PYTHON-CHANGELOG.txt
40-
- name: Get the version
41-
id: get_version
42-
run: echo "VERSION=$(echo $GITHUB_REF | cut -d / -f 3)" >> $GITHUB_OUTPUT
4336
- name: C Release
4437
uses: softprops/action-gh-release@v2.5.0
4538
if: startsWith(github.ref, 'refs/tags/') && contains(github.event.ref, 'C_')
4639
with:
47-
name: C API ${{ steps.get_version.outputs.VERSION }}
48-
body_path: C-CHANGELOG.txt
4940
draft: True
50-
fail_on_unmatched_files: True
5141
files: build-gcc/meson-dist/*
52-
- name: Python Release
53-
uses: softprops/action-gh-release@v2.5.0
54-
if: startsWith(github.ref, 'refs/tags/') && !contains(github.event.ref, 'C_')
55-
with:
56-
name: Python ${{ steps.get_version.outputs.VERSION }}
57-
body_path: PYTHON-CHANGELOG.txt
58-
draft: True
59-
fail_on_unmatched_files: True

docs/convert_changelog.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/development.md

Lines changed: 15 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,16 @@ We use the
684684
Unit tests use the [CUnit](http://cunit.sourceforge.net) library
685685
and we use [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
686686
to automatically format code.
687-
On Debian/Ubuntu, these can be installed using
687+
On Debian/Ubuntu, install the system dependencies with:
688688

689689
```bash
690-
$ sudo apt install libcunit1-dev ninja-build meson
690+
$ sudo apt install libcunit1-dev ninja-build
691+
```
692+
693+
Install meson using uv:
694+
695+
```bash
696+
$ uv tool install meson
691697
```
692698

693699
An exact version of clang-format is required because formatting rules
@@ -1184,70 +1190,11 @@ the following files:
11841190

11851191
## Releasing a new version
11861192

1187-
Tskit maintains separate versioning for the C API and Python package, each has its own
1188-
release process.
1189-
1190-
1191-
### C API
1192-
1193-
To release the C API, the ``TSK_VERSION_*`` macros should be updated,
1194-
along with ``VERSION.txt`` and the changelog updated with the release
1195-
date and version. The changelog should also be checked for
1196-
completeness. Comparing ``git log --follow --oneline -- c`` with
1197-
`git log --follow --oneline -- c/CHANGELOG.rst` may help here.
1198-
After the commit including these changes has been merged, tag a
1199-
release on GitHub using the pattern `C_MAJOR.MINOR.PATCH`, with:
1200-
1201-
```bash
1202-
git tag -a C_MAJOR.MINOR.PATCH -m "C API version C_MAJOR.MINOR.PATCH"
1203-
git push upstream --tags
1204-
```
1205-
1206-
After a couple of minutes a github action will make a draft release with the changelog
1207-
at the [releases page](https://github.com/tskit-dev/tskit/releases). Check it looks
1208-
right and publish the release (Click on the little pencil).
1209-
After release, start a section in the changelog for new developments and close the
1210-
GitHub issue milestone of the release.
1211-
1212-
1213-
### Python
1214-
1215-
It is worth running the benchmarks as above before release to check for any unexpected
1216-
major regressions. To make a release first prepare a pull request that sets the correct
1217-
version number in `python/tskit/_version.py` following PEP440 format. For a normal
1218-
release this should be MAJOR.MINOR.PATCH, for a beta release use MAJOR.MINOR.PATCHbX
1219-
e.g. 1.0.0b1. Update `python/CHANGELOG.rst`, ensuring that all significant
1220-
changes since the last release have been listed. Comparing
1221-
`git log --follow --oneline -- python`
1222-
with `git log --follow --oneline -- python/CHANGELOG.rst` may help here.
1223-
1224-
Once this PR is merged, the release process is:
1225-
1226-
1. **Test on TestPyPI**: push to the `test-publish` branch. The `wheels.yml`
1227-
workflow will build wheels and publish them to
1228-
[TestPyPI](https://test.pypi.org/project/tskit/). Check the release looks
1229-
correct there.
1230-
1231-
2. **Tag the release**: push a tag to trigger the draft GitHub release:
1232-
1233-
```bash
1234-
git tag -a MAJOR.MINOR.PATCH -m "Python version MAJOR.MINOR.PATCH"
1235-
git push upstream --tags
1236-
```
1237-
1238-
The `release.yml` workflow will create a draft release on the
1239-
[releases page](https://github.com/tskit-dev/tskit/releases) with the
1240-
changelog. Review the draft and publish it.
1241-
1242-
3. **Publish to PyPI**: publishing the GitHub release triggers `wheels.yml`,
1243-
which builds wheels and uploads them to
1244-
[production PyPI](https://pypi.org/project/tskit/) via Trusted Publisher.
1245-
Check the Actions tab to confirm the upload completes.
1246-
1247-
#### Post release
1193+
See the [repo administration guide](https://github.com/tskit-dev/.github/blob/main/repo_administration.md)
1194+
for the release process. Tskit has both a C API release and a Python package release,
1195+
each covered in the tskit/kastore section of that document.
12481196

1249-
After release, start a section in the changelog for new developments, close the
1250-
GitHub issue milestone of the release and update the python version to a `.dev`.
1251-
For a major release the website (github repo tskit-dev/tskit-site) should then
1252-
be updated with a notebook of new features. The benchmarks should be run as above
1253-
and the `bench-results.html` updated on the website.
1197+
It is worth running the benchmarks (see above) before a Python release to check
1198+
for any unexpected major regressions. For a major release the website
1199+
(github repo tskit-dev/tskit-site) should be updated with a notebook of new
1200+
features and the `bench-results.html` updated.

0 commit comments

Comments
 (0)