Creating a release#
Releases are produced by four GitHub Actions workflows that work together:
create-release-branch.yml— creates a long-livedrelease/vX.Ybranch (major/minor only).create-release.yml— tags the release on a release branch and creates the GitHub release (major / minor / patch / rc).post-release-cleanup.yml— opens a follow-up PR after a release PR is merged intomain.publish-pypi.yml— publishes to PyPI; runs automatically when a GitHub release is published.
Before tagging a major, minor, or patch release, run the plugin compatibility test against the release branch.
Major / minor release#
Go to the
Actionstab on GitHub, select Create release branch (minor/major), click Run workflow and chooseminorormajor.The workflow creates a
release/vX.Ybranch offmain(e.g.release/v1.4), bumps the version toX.Y.0, and updatesdocs/changelog.rstanddocs/_static/switcher.json. The branch is pushed but no PR is opened yet.Push any final fixes or changelog tweaks directly to the release branch. When you are happy with the release content, run the Create release workflow on this branch with type
majororminor. This tags the branch HEAD asvX.Y.0, creates a GitHub release marked as latest, opens a PR fromrelease/vX.Yintomain, comments thepyproject.tomldiff since the previous tag on that PR, and publishes the versioned docs to GitHub Pages.Publishing the GitHub release automatically triggers
publish-pypi.ymlwhich uploads the package to PyPI.Merge the release PR into
mainWITHOUT SQUASHING! This automatically triggers Post-release cleanup, which opens a follow-up PR resetting the version in source toX.Y.Z.dev0and adding a freshUnreleasedsection todocs/changelog.rst.The newly published PyPI package will trigger a new PR to the HydroMT feedstock repo on conda-forge. Use the
pyproject.tomldiff comment from step 3 to check whethermeta.ymlneeds updating. Merge the PR to release on conda-forge.Celebrate the new release!
Patch release#
Patch releases are made against an already-existing release/vX.Y branch rather than creating a new one.
Go to the
Actionstab on GitHub, select Create release, click Run workflow.Enter the release branch (e.g.
release/v1.4) and choosepatchas the release type.The workflow increments the patch version (reading the current version from the branch), updates the changelog and
switcher.json, commits the bump, tags HEAD asvX.Y.Z, creates a GitHub release marked as latest, opens a PR fromrelease/vX.Yintomain, comments thepyproject.tomldiff since the previous tag, and publishes the versioned docs to GitHub Pages. The package is published to PyPI automatically.Merge the auto-opened PR. Once merged, Post-release cleanup opens its follow-up PR.
Release candidate#
Release candidates are feature-complete builds expected to become the final release unless critical issues are found. They are produced from a release/vX.Y branch using the same Create release workflow.
Go to the
Actionstab on GitHub, select Create release, click Run workflow.Enter the release branch (e.g.
release/v1.4) and choosercas the release type.The workflow computes the next available rc version of the form
X.Y.ZrcNbased on existing tags, commits the version bump on the release branch, tags it asvX.Y.ZrcNand creates a GitHub pre-release. The package is published to PyPI automatically.Anyone can install the release candidate with:
pip install hydromt==X.Y.ZrcN
The exact install command is shown in the body of the GitHub pre-release.
Note
Release candidates are built from a release/vX.Y branch only. They share the same long-lived branch as the eventual full release, so the rc commits become part of the release history.
Warning
Pre-release versions are marked as pre-releases on GitHub and are not promoted as the latest stable release. They are intended for testing purposes only. Do not use a release candidate as the basis for a full release; run Create release with type major / minor / patch to produce the actual release.
Plugin compatibility test#
Before tagging a major, minor, or patch release, you must run the downstream plugin compatibility test against the release branch. This is part of the release gate. It checks whether the new HydroMT wheel still works with a set of mature plugins.
The workflow builds the actual wheel that would be published on PyPI and installs that wheel into each plugin’s Pixi environment. We do not use an editable install. This makes sure we test the real release artifact, including packaging metadata and included data files.
For each plugin, the workflow runs in two modes.
In the first mode, HydroMT is installed with --no-deps (deps=false).
This upgrades only the HydroMT wheel and keeps the plugin’s existing, already solved environment unchanged.
This simulates a user upgrading HydroMT in an existing environment.
If this fails, it means the upgrade is not fully drop-in compatible.
These failures must be reviewed, but they are not automatically release blockers.
In the second mode, HydroMT is installed allowing dependency updates (deps=true).
This allows the environment to re-solve and update third-party packages if needed.
This simulates a clean installation.
If this fails, the release is considered broken and must not be finalised.
These failures are release blockers.
How to run the compatibility test#
Make sure your release branch (for example
release/vX.Y) is up to date.Go to the GitHub Actions tab.
Select the Downstream plugin compatibility workflow.
Click Run workflow and choose the release branch.
If the with dependencies run fails, you must fix the problem before continuing the release.
If the no-deps run fails, review the failure and decide what to do.
You may need to restore backward compatibility in core, coordinate a plugin update, or accept that upgrading HydroMT requires re-solving the environment.
Do not finalise the release until all blocking failures are resolved and advisory failures have been reviewed.