Release workflow#
This page describes the lightweight manual release process for HydroMT-SFINCS. It covers release candidates (RCs) and final releases; it does not use the automated release-branch workflows from HydroMT core.
The package version is defined by __version__ in
hydromt_sfincs/__init__.py. Release tags start with v. For example,
the release branch and tags for version 2.0.0 are
release/v2.0.0, v2.0.0-rc1, and v2.0.0.
Release candidate#
Merge the changes intended for the release into
mainthrough the usual pull-request process. Mergemaininto the release branch (for example,release/v2.0.0) and run or check the CI tests there. Create the release branch frommainif it does not exist yet.Set
__version__inhydromt_sfincs/__init__.pyto the next candidate version, such as2.0.0-rc4. Update the top heading indocs/changelog.rstto match and ensure the candidate’s changes are described.Commit and push the version and changelog updates to the release branch. Tag that commit and push the tag:
git tag -a v2.0.0-rc4 -m "Release candidate 4 for v2.0.0" git push origin release/v2.0.0 git push origin v2.0.0-rc4
Use the appropriate version and RC number, and do not reuse an existing tag. Pushing a
v*tag starts the publish workflow: it builds and checks the package, then uploads it to TestPyPI.To make the candidate available as a GitHub pre-release, create and publish a pre-release using that tag. Note that publishing any GitHub release, including a pre-release, also triggers the workflow to upload the package to PyPI. The documentation workflow also publishes the versioned candidate documentation, but does not change the
latestorstablealiases.Test the candidate and make any required fixes on the release branch. Merge those fixes into
mainas well, or merge the release branch back intomainafter the final release.
Final release#
Once the release candidate is accepted, make sure the release branch contains all intended changes and fixes. Run or check the CI tests.
Set
__version__to the final version (for example,2.0.0). Update the changelog heading with the final version and release date, and finalize the release notes.Commit and push these updates to the release branch. Create and push a tag on that commit:
git tag -a v2.0.0 -m "HydroMT-SFINCS v2.0.0" git push origin release/v2.0.0 git push origin v2.0.0
Pushing the tag builds and checks the package and uploads it to TestPyPI.
Create a GitHub release from the final tag and publish it as a regular release, not a pre-release. This triggers the package upload to PyPI. The documentation workflow publishes the versioned documentation and updates the
stablealias after a successful build. Check the Actions run, the published package on PyPI, and thestabledocumentation.This repository does not have HydroMT core’s automated record-release workflow. After the final release, create a pull request from the release branch back into
mainand merge it with a regular merge so the released version and any release-only fixes are preserved. Set__version__onmainto the next development version, using a.dev0suffix (for example,2.1.0.dev0). Add a fresh unreleased section to the changelog withAdded,Changed,Fixed,Deprecated, andRemovedsubsections.Successful documentation builds from
mainupdate thelatestalias. Thestablealias is only updated by a published, non-prerelease GitHub release.