Creating Releases - nlpie/biomedicus GitHub Wiki
Pre-requisites
It's assumed you have commit signing working (https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
Creating the release commit
Create a release branch, e.g. release/v3.x.x. It is important to name the branch "release/VERSION" because this specific format is configured in the CI to build biomedicus_client with the (future) release version, the CI checks will fail otherwise due to not having access to the unreleased version of biomedicus_client that will be specified in biomedicus.
export VERSION=v3.y.z
git checkout -b release/${VERSION:?}
Version bump the [tools.setuptools_scm] fallback_version to the new release version in
biomedicus_client/pyproject.toml
pyproject.toml
Pin the floating dependencies
- "mtap" in
biomedicus_client/pyproject.toml
to the current stable MTAP python version - "edu.umn.nlpie:mtap" in
java/build.gradle
to the current stable MTAP java version - "biomedicus_client" in
pyproject.toml
to the new version we're releasing right now.
Push branch to GitHub.
git commit -S -m "Release ${VERSION#v}"
git push -u origin release/${VERSION}
Create pull request and merge this onto the main branch. Switch back to the main branch, sync, create new signed tag on the merged commit, and push this tag to the upstream remote.
git checkout main
git pull
git tag -as ${VERSION} -m "Release ${VERSION#v}"
git push origin ${VERSION}
Push to PyPI
pip install build twine
rm -r build dist biomedicus_client/build
python -m build -s -w -o dist biomedicus_client/
python -m build -s -w .
twine check dist/*
twine upload dist/*
Post-release
Draft a GitHub release for the release tag which documents any relevant changes. Update any necessary documentation on the gh-pages branch website.