1. Check that all intended branches have been merged to the release branch you want to upgrade, in this example `release/1.3.x`. Branch off from `release/1.3.x` and create a new branch:
bash
git checkout release/1.3.x
git pull
git checkout -b minor-version-update
2. Update `heat/core/version.py` like this:
python
"""This module contains Heat's version information."""
major: int = 1
"""Indicates Heat's main version."""
minor: int = 3
"""Indicates feature extension."""
micro: int = 0 <-- update to 1
"""Indicates revisions for bugfixes."""
extension: str = None
"""Indicates special builds, e.g. for specific hardware."""
3. Commit and push new `version.py` in `minor-version-update`
4. Create a pull request from `minor-version-update` to `release/1.3.x`
- Remember to get a reviewers approval.
- Wait for the test to finish.
- Squash and merge.
5. Draft release notes:
- Go to the GitHub repo's [Releases](https://github.com/helmholtz-analytics/heat/releases) page.
- The release notes draft is automated. Click on Edit Draft
- Select the new tag: `v1.3.1`
- Edit release notes as needed (see older releases)
- Save the changes to the release notes WITHOUT PUBLISHING!!
6. Build wheel in your local `heat/` directory, make sure you are on branch `release/1.3.x`.
bash
rm -f dist/*
python -m build
You might have to install the `build` package first (i.e. with `conda install build` or `pip install build`)
7. Upload to Test PyPI and verify things look right. You need to install `twine` first.
bash
twine upload -r testpypi dist/*
`twine` will prompt for your username and password.
- Look at the testpypi repository and make sure everything is correct (version number, readme, etc.)
8. When everything works, upload to PyPI:
bash
twine upload dist/*
9. Update conda-forge recipe (Need to be listed as maintainer, either ClaudiaComito, mrfh92, JuanPedroGHM)
- Go to https://github.com/conda-forge/heat-feedstock
- A new PR should have been automatically created.
- Changes can be pushed to the PR.
- Make sure the version number is correct.
- Make sure the SHA points to the correct PyPI release.
- Make sure dependencies match.
- Once the PR is done, wait for the CI checks to finish and merge.
- Refer to the conda-forge docs if there are any issues: https://conda-forge.org/docs/maintainer/updating_pkgs.html#pushing-to-regro-cf-autotick-bot-branch
10. Go back to the Release Notes draft and publish them. The new release is out!
- Make sure the CHANGELOG.md got updated in the release branch, in this case `release/1.3.x`, if not, call JuanPedroGHM.
- Check Zenodo to make sure a DOI was created for the release.
11. Now we want to update `main` to the latest version, and we want the version on `main` to be `1.4.0-dev`.
- Create a new branch from `release/1.3.x`, for example `merge-latest-release-into-main`
- Merge `main` into `merge-latest-release-into-main`, resolve conflicts and push.
- Create a PR from `merge-latest-release-into-main`, base branch must be `main`
- Make sure the version number in `merge-latest-release-into-main` is correct (i.e., it matches that in `main`).
- Make sure the CHANGELOG.md in `merge-latest-release-into-main` matches that in the latest release branch, in this example`release/1.3.x`.
- Get a reviewers approval, wait for the CI checks to pass, and merge.