@@ -877,3 +877,55 @@ the C and Python APIs.
877
877
11. Update your Pull Request (`rebasing <https://stdpopsim.readthedocs.io/en/
878
878
latest/development.html#rebasing> `_ if necessary!) and let the community check
879
879
your work.
880
+
881
+ ***********************
882
+ Releasing a new version
883
+ ***********************
884
+
885
+ Tskit maintains separate visioning for the C API and Python package, each has its own
886
+ release process.
887
+
888
+ -----
889
+ C API
890
+ -----
891
+
892
+ To release the C API, the ``TSK_VERSION_* `` macros should be updated, and the changelog
893
+ updated with the release date and version. The changelog should also be checked for
894
+ completeness. Comparing ``git log --follow --oneline -- c `` with
895
+ ``git log --follow --oneline -- c/CHANGELOG.rst `` may help here.
896
+ After the commit including these changes has been merged, tag a
897
+ release on GitHub using the pattern ``C_MAJOR.MINOR.PATCH ``, with::
898
+
899
+ git tag -a C_MAJOR.MINOR.PATCH -m "C API version C_MAJOR.MINOR.PATCH"
900
+ git push upstream --tags
901
+
902
+ Then prepare a release for the tag on GitHub, copying across the changelog.
903
+ After release, start a section in the changelog for new developments.
904
+
905
+ ------
906
+ Python
907
+ ------
908
+
909
+ To make a release first prepare a pull request that sets the correct version
910
+ number in ``tskit/_version.py `` following PEP440 format. For a normal release
911
+ this should be MAJOR.MINOR.PATCH, for a beta release use MAJOR.MINOR.PATCHbX
912
+ e.g. 1.0.0b1. Update the Python CHANGELOG.rst, ensuring that all significant
913
+ changes since the last release have been listed. Comparing
914
+ ``git log --follow --oneline -- python ``
915
+ with ``git log --follow --oneline -- python/CHANGELOG.rst `` may help here.
916
+ Once this PR is merged, push a tag to github::
917
+
918
+ git tag -a MAJOR.MINOR.PATCH -m "Python version MAJOR.MINOR.PATCH"
919
+ git push upstream --tags
920
+
921
+ This will trigger a build of the distribution artifacts for Python
922
+ on `Github Actions <https://github.com/tskit-dev/tskit/actions >`_. and deploy
923
+ them to the `test PyPI <https://test.pypi.org/project/tskit/ >`_. Check
924
+ the release looks good there, then create a release on Github based on the tag you
925
+ pushed. Copy the changelog into the release. Publishing this release will cause
926
+ the github action to deploy to the
927
+ `production PyPI <https://pypi.org/project/tskit/ >`_.
928
+ After release, start a section in the changelog for new developments.
929
+
930
+
931
+
0 commit comments