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 attempts to update the
stablealias. It does not update the version switcher. After the documentation build succeeds, add the new version to the rootswitcher.jsonon thegh-pagesbranch. For example:{ "name": "v2.0.0", "version": "v2.0.0", "url": "https://deltares.github.io/hydromt_sfincs/v2.0.0/" }
Preserve the existing entries and valid JSON syntax. To update the
gh-pagesbranch locally:git fetch origin git switch gh-pages # edit switcher.json git add switcher.json git commit -m "Add v2.0.0 to docs version switcher" git push origin gh-pages
Use the actual release version in the entry and commit message. If branch protection prevents a direct push, make the change through a pull request. Check the versioned documentation, the switcher, and the
stablealias; a successful Actions run alone does not confirm that the alias points to the new release. The current deployment usesdestination_dir: stable. Whenstableis a symlink ongh-pages, verify that the deployment has advanced its target rather than writing through the existing symlink.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. The stable deployment runs only for a published, non-prerelease GitHub release. Verify thatstablepoints to the latest final version and that the historical version directories remain intact.