Releases are managed with the release.yml GitHub Actions workflow.
Everything after step 1 runs automatically or directly on the GitHub website —
no local git commands are required.
| Step | Who does it | What happens |
|---|---|---|
| 1 | You (GitHub website) | Create a v*.*.* branch to start the workflow |
| 2 | Workflow (automatic) | Version bump + changelog committed to branch |
| 3 | You (GitHub website) | Review and merge the draft PR into main |
| 4 | Workflow (automatic) | Draft GitHub release created with changelog |
| 5 | You (GitHub website) | Publish the draft release |
| 6 | Workflow (automatic) | Package built and published to PyPI |
- Go to the repository on GitHub.
- Click the branch dropdown (top-left of the file browser, shows the current branch name).
- Type a new branch name in the format
v<major>.<minor>.<patch>— for examplev1.2.0. For a release candidate usev1.2.0rc1. - Select Create branch: v1.2.0 from
develop(or whichever base branch you want to release from).
Pushing the new branch triggers release.yml automatically.
The Prepare release job runs on the new branch and does the following:
- Extracts the version from the branch name (strips the leading
v). - Updates
mf6adj/version.pywith the new version number. - Generates
changelog/CHANGELOG.mdby callingscripts/generate_changelog.py. This script collects all pull requests merged since the last git tag (using the GitHub CLI) and formats them as a Keep-a-Changelog entry. If the GitHub CLI is unavailable it falls back to git commit messages. - Commits and pushes both changed files back to the release branch with
the message
bump version to <version> [skip ci].
For release candidates (rc suffix) the workflow stops here — no PR is
opened.
For full releases a second job opens a draft pull request titled
Release <version> targeting main.
Previewing the changelog locally (optional)
If you want to see what the changelog will look like before starting the release, run this from the repository root:
python scripts/generate_changelog.py --version 1.2.0 --dry-runThis prints the new changelog entry without writing anything to disk.
- Go to the Pull Requests page on GitHub.
- Open the draft PR titled Release <version>.
- Check the automated commit — verify
mf6adj/version.pyhas the right version andchangelog/CHANGELOG.mdlooks correct. You can edit either file directly on GitHub if corrections are needed (commit to the release branch). - Click Ready for review, then merge the PR into
main.
Merging into main triggers the Draft release job, which creates a
GitHub release (still in draft) tagged v<version> and populates the release
notes from the changelog.
- Go to the Releases page.
- Open the draft release (labelled Draft).
- Review the title and release notes; edit if needed.
- Click Publish release.
Publishing the release triggers the final Publish package job.
The Publish package job runs automatically after the release is published.
It builds the package with uv build, validates it with twine check, and
uploads it to PyPI using trusted publishing
(no API token required).
The job runs inside the release GitHub environment. If it hasn't been
configured yet, go to Settings → Environments in the repository and create
an environment named release with the appropriate protection rules.
- Release branch named
v<major>.<minor>.<patch>created fromdevelop - Automated prep commit visible on the release branch
-
changelog/CHANGELOG.mdreviewed and correct -
mf6adj/version.pyshows the correct version - Draft PR merged into
main - Draft GitHub release published
- Publish package job completed successfully on PyPI