Skip to content

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.

  1. Review the unreleased entries: update main and the tags, check that the CI of main passes, then compare the ## [Unreleased] section of CHANGELOG.md with 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)..HEAD
    

    Every 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.

  2. 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).
  3. Open the pull request of the release: main only changes through pull requests.

    make release-pr VERSION=X.Y.Z
    

    The command checks that X.Y.Z is 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 of main has entries, all in subsections, and no empty subsection. It commits CHANGELOG.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 of main on GitHub, so your checkout does not change. After your confirmation, it pushes the commit to the branch release/vX.Y.Z and opens the pull request docs: 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 main as a single commit. Committers can merge it without waiting for a review.

  4. Tag the release, once the pull request is merged:

    make release-tag VERSION=X.Y.Z
    

    The command finds the commit of main that adds ## [X.Y.Z] to CHANGELOG.md, the one of the pull request, and checks that it is the first versioned section there, and that no later commit of main changed that section. It shows the commit, and after your confirmation pushes the signed tag vX.Y.Z on 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-tag refuses then, and so does the next make release-pr if 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.Z with 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: the Publish workflow replaces them with Otterdog vX.Y.Z and the notes of the version.

    Warning

    A tag can be neither moved nor deleted (ruleset tags-protection of the repository). The notes of the GitHub release are the first versioned section of CHANGELOG.md in 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-tag only tags the commit of the release pull request.

  5. Check the publication: the tag starts the Publish workflow (.github/workflows/publish.yml), which builds the package and its SLSA provenance, publishes it to PyPI, pushes the container image ghcr.io/eclipse-csi/otterdog tagged 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.