Release Process¶
Each pull request with a change visible to users adds its own entry to
CHANGELOG.md, under ## [Unreleased] (see
Update the changelog). A release does not collect the changes: a
small pull request gives the [Unreleased] section a version and a date, then its commit on main is tagged.
The GitHub release shows the section of the version from CHANGELOG.md, followed by the list that GitHub generates
of every pull request merged since the previous release, with its author, the new contributors, and the dependency
updates grouped apart (configured in .github/release.yml).
The version of the package comes from the git tag (poetry-dynamic-versioning): there is no version to change in
pyproject.toml.
The release process is performed by committers following these steps. make release-pr and make release-tag run
release.py, which needs gh to open the pull request (otherwise it prints the link to
open it), and signs with your git signing key. They find the remote of eclipse-csi/otterdog among your remotes;
choose it with REMOTE=<name> if you have several. The git commands of step 1 call it upstream, as set up in the
contribution workflow.
-
Review the unreleased entries: update
mainand the tags, check that the CI ofmainpasses, then compare the## [Unreleased]section ofCHANGELOG.mdwith the commits since the last release:git switch main git pull --ff-only upstream main git fetch --tags upstream git log --oneline $(git describe --tags --abbrev=0)..HEADEvery change visible to users has its entry, and every breaking change gives its migration path. Fix a missing or wrong entry with a pull request before the release. The generated list shows the titles of the merged pull requests: rename a pull request whose title does not describe its change.
-
Choose the version from the entries, following semantic versioning:
- a breaking change (an entry that starts with
**Breaking**:): bump the major version (e.g., 1.2.0 → 2.0.0); - new features (
### Added): bump the minor version (e.g., 1.2.0 → 1.3.0); - bug fixes only: bump the patch version (e.g., 1.2.0 → 1.2.1).
- a breaking change (an entry that starts with
-
Open the pull request of the release:
mainonly changes through pull requests.The command checks that
X.Y.Zis higher than every released version, that no entry was added to the section of the last release after its tag, and that the[Unreleased]section ofmainhas entries, all in subsections, and no empty subsection. It commitsCHANGELOG.md, signed and signed off, with that section renamed to## [X.Y.Z] - DD/MM/YYYY(the date of the day) below a new empty## [Unreleased]. The commit is made in a temporary worktree ofmainon GitHub, so your checkout does not change. After your confirmation, it pushes the commit to the branchrelease/vX.Y.Zand opens the pull requestdocs: changelog X.Y.Z.Merge it with Squash and merge, also when commits were pushed to it to fix an entry: step 4 tags the commit that adds the section, so the pull request must land on
mainas a single commit. Committers can merge it without waiting for a review. -
Tag the release, once the pull request is merged:
The command finds the commit of
mainthat adds## [X.Y.Z]toCHANGELOG.md, the one of the pull request, and checks that it is the first versioned section there, and that no later commit ofmainchanged that section. It shows the commit, and after your confirmation pushes the signed tagvX.Y.Zon it. The pull requests merged after it are not part of the release.A pull request opened before the release and merged after it can put its entry under
## [X.Y.Z]: git applies it next to the same lines, which the release moved under the version, without any conflict.make release-tagrefuses then, and so does the nextmake release-prif the tag was pushed first. Move the entry under## [Unreleased]with a pull request, then run the command again.In the GitHub web interface instead: Releases → Draft a new release, create the tag
vX.Y.Zwith the commit of the release pull request as target (main, if nothing was merged after it), then Publish release. The tag is created when the release is published, not while it is a draft, and it is not signed. The title and the description can stay empty: thePublishworkflow replaces them withOtterdog vX.Y.Zand the notes of the version.Warning
A tag can be neither moved nor deleted (ruleset
tags-protectionof the repository). The notes of the GitHub release are the first versioned section ofCHANGELOG.mdin the tagged commit, so a tag on an earlier commit publishes the notes of the previous release, and the release can then only be fixed by editing its notes by hand.make release-tagonly tags the commit of the release pull request. -
Check the publication: the tag starts the
Publishworkflow (.github/workflows/publish.yml), which builds the package and its SLSA provenance, publishes it to PyPI, pushes the container imageghcr.io/eclipse-csi/otterdogtagged with the version, and creates or updates the GitHub release with the notes of the version and the generated list of pull requests. Check that the workflow succeeded and that the GitHub release shows the notes of the new version.