Between releases, changes are made on the 'dev' branch and recorded in the changelog.rst in the latest section. This follows the successful Git branching model by Vincent Driessen.
Once the 'dev' branch has reached a stage where a new release is justified or required, the following steps must be followed.
Warning
Always replace #.#.# with the actual version number in the steps below. Version numbers must follow Semantic Versioning guidelines.
create and checkout a 'release-v#.#.#' branch from the 'dev' branch:
git checkout -b release-v#.#.# dev
update the version in unifhy/version.py:
__version__ = '#.#.#'
make sure that the changelog.rst file contains all the noteworthy changes since the last release, change 'latest' to 'v#.#.#' and add "Released on YYYY-MM-DD." (replace with release date) below the version number:
v#.#.# ------ Released on YYYY-MM-DD.
commit these changes to the release branch and push to remote, e.g. 'origin':
git commit -am "update version for release" git push -u origin release-v#.#.#
build the documentation for this version by running Actions workflow using GitHub CLI (see how-to-build-documentation.rst for details):
gh workflow run build_docs.yml --ref release-v#.#.# -f branch=release-v#.#.# -f release=#.#.#
create a draft pull request on GitHub to merge the release branch in 'main' branch
in the pull request, click "Ready for review" to trigger the advanced testing workflow in GitHub Actions
if tests have failed, fix accordingly, and re-run the GitHub Actions workflow
once tests have passed, merge pull request into 'main' branch by choosing the option "Create a merge commit"
draft a release on GitHub using 'v#.#.#' for both the tag version and the release title, and use 'v#.#.# release' for the release description and click "Publish release"
merge 'main' branch into 'dev' branch to update live documentation living on 'dev' branch:
git fetch origin main git merge origin/main git checkout dev git merge main git fetch origin dev git push origin dev