Skip to content

chore: adjust versions after the 3.8.4 release - #61

Merged
tonyandrewmeyer merged 1 commit into
mainfrom
post-release-3.8.4
Oct 5, 2026
Merged

tonyandrewmeyer merged 1 commit into
mainfrom
post-release-3.8.4

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

3.8.4 is drafted, so main goes back to a development version.

  • ops and ops-tracing go to 3.9.0.dev0, and ops-scenario follows it.
  • The tool-versions table is left alone: it records releases, and this is not one.

This is safe to merge before the draft release is published: the draft is pinned to the commit that was reviewed, not to the branch.

The version here is a placeholder that stops the tree claiming to be 3.8.4. Nothing counts from it - the next release is counted from the last tag on the branch - so it does not matter if the next release turns out to be a different one.

@tonyandrewmeyer
tonyandrewmeyer merged commit acd1951 into main Oct 5, 2026
tonyandrewmeyer added a commit to canonical/operator that referenced this pull request Oct 7, 2026
This replaces `.github/release.py` with two workflows, so that a release
happens in Actions rather than on a maintainer's machine, and the human
steps become reviewing a PR and publishing a draft release (the flow
agreed in #2224).

* "Propose a release" (`workflow_dispatch`) works out the version from
the conventional commits since the last tag (or takes one as input),
updates the version files and `CHANGES.md`, drafts the release notes via
OpenRouter, and opens the bump PR with the notes in the description. If
the version it works out from the commits is already tagged elsewhere,
it stops and asks for an explicit version. The changelog, the version
inference and the notes drafting come from canonical/charm-tech-code
(the `changelog` and `draft-release-notes` tools), so our other repos
can use them too. It also credits contributors from outside the team,
which we've been doing by hand (and sometimes forgetting).
* "Create the draft release" (`workflow_dispatch`, given the number of
the merged bump PR) checks that the PR was merged to `main` or a
`*-maintenance` branch and moved to a non-dev version, and creates a
draft release from the PR description plus the `CHANGES.md` entry,
targeting the merged commit. It never publishes anything or creates a
tag. It then opens the PR that moves the branch back to a dev version.
* Both workflows run from `main`, including for a maintenance release:
both are dispatched, so the workflow always comes from the default
branch, and the scripts and release-note examples are read from `main`
rather than from the branch being released. That means nothing has to be
backported to `2.23-maintenance` (or any other maintenance branch) for
this to work there.
* `publish.yaml` now triggers on `release: published` rather than on a
tag push, so publishing the draft is explicitly what sends the package
to PyPI rather than a side effect of the tag being created.
`test-publish.yaml` is folded into it as the `workflow_dispatch` job.
* `release.py`, its tox environments, and the `release` dependency group
are removed. The check for open "update charm pins" PRs goes with it and
isn't replaced (as written it only fired with two or more open, and I
don't think we want it). The `.github/` script tests now run as part of
`tox -e unit`.
* The release section of `CONTRIBUTING.md` is rewritten for the new
process.

To review, I'd start with the release section of `CONTRIBUTING.md`,
which walks through the whole flow, then `propose-release.yaml`,
`create-draft-release.yaml`, and `publish.yaml`, and finally
`update-release-versions.py` and its tests.

I've run the flow on my fork, with this branch merged into the fork's
`main`: a [dry run without a
version](https://github.com/tonyandrewmeyer/operator/actions/runs/37292054966),
which stops because 3.8.3 is tagged outside `main`'s history, a [dry run
with
3.8.4](https://github.com/tonyandrewmeyer/operator/actions/runs/37292158459),
the
[proposal](https://github.com/tonyandrewmeyer/operator/actions/runs/37292271500)
([fork#60](tonyandrewmeyer#60)), the
[draft release and post-release
PR](https://github.com/tonyandrewmeyer/operator/actions/runs/37294123074)
([fork#61](tonyandrewmeyer#61)),
publishing the
[draft](https://github.com/tonyandrewmeyer/operator/releases/tag/3.8.4)
(which created the tag on the merge commit), and merging the
post-release PR. I haven't run a pre-release or a maintenance release
through the workflows, but I have run `update-release-versions.py`
against `2.23-maintenance` and `3.3-maintenance` in both modes, and it
rewrites the four version files and skips the versions doc that neither
branch has.

There are also two settings changes: a `release-notes` environment with
an `OPENROUTER_API_KEY` secret and an `OPENROUTER_MODEL` variable
(without them the workflow puts a placeholder where the notes would go,
rather than failing), and the Test PyPI trusted publisher needs to point
at `publish.yaml` instead of `test-publish.yaml`. Separately, both
workflows open their PRs with `GITHUB_TOKEN`, so checks don't start on
those PRs until someone closes and reopens them. A token that starts
checks (an app token, or a PAT in a repository secret) would fix that,
but I'd rather do that after the first release with this.

Fixes #2224

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants