ci: back-merge master into develop after every release

release-plz owns the workspace version and the changelog, and writes both on
master. Nothing carried either back, so develop still declared 14.1.2 five
releases after v14.1.2 shipped. Nightly builds the tip of develop, which meant
every nightly binary reported --version 14.1.2 against a released 18.0.0, and
the changelog on the branch the work happens on stopped at v14.1.2 too.

The job merges master whole rather than cherry-picking the bump, so the
changelog travels with it, and hangs off `release` rather than `binaries` so the
sync does not wait on six binary builds. develop never edits those lines itself,
which is what keeps the merge clean; a conflict fails the job rather than
resolving itself quietly. Nothing in the repository triggers on a push to
develop, so this neither loops back into the workflow nor spends a CI run.
This commit is contained in:
Michel de Graaf
2026-09-10 12:04:08 +02:00
parent 9ebaebca2a
commit 5581fa6d10
2 changed files with 52 additions and 1 deletions
+44
View File
@@ -222,3 +222,47 @@ jobs:
exit 1
}
gh workflow run formula.yml --repo michel/homebrew-tap
# release-plz writes the version bump and the changelog on master, and until
# now nothing carried them back: develop was still declaring 14.1.2 five
# releases after v14.1.2 shipped. Nightly builds the tip of develop, so every
# nightly binary reported a version that had not been current for weeks, and
# the changelog on the branch the work happens on stopped at v14.1.2.
#
# Hangs off `release` rather than `binaries` so the sync does not wait on six
# binary builds, and merges master whole rather than cherry-picking the bump
# so that the changelog comes along with it. develop never edits those lines
# itself, which is what keeps the merge clean; on the day it does conflict
# this job fails loudly and the merge wants doing by hand.
#
# Nothing in this repository triggers on a push to develop, so pushing here
# neither loops back into this workflow nor spends a CI run.
backmerge:
name: Back-merge into develop
needs: release
if: ${{ !cancelled() && needs.release.outputs.tag != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: develop
token: ${{ secrets.RELEASE_PLZ_TOKEN || secrets.GITHUB_TOKEN }}
- name: Merge master into develop
env:
TAG: ${{ needs.release.outputs.tag }}
run: |
# Spelled out rather than read from master's tip: this history carries
# one person's attribution, and whoever happened to click merge on the
# release PR is not the right source for it.
git config user.name "Michel de Graaf"
git config user.email "michel@re-invention.nl"
# checkout was pointed at develop, and which other tracking refs it
# leaves behind is its own business — ask for master by name.
git fetch origin master
# A manual binary rebuild reaches this job with develop already
# containing master; git says "Already up to date" and the push is a
# no-op, so the dispatch path needs no guard of its own.
git merge --no-ff origin/master -m "merge: back-merge $TAG into develop"
git push origin develop
+8 -1
View File
@@ -29,10 +29,17 @@ Releases are automated by [release-plz](https://release-plz.dev). You do not run
| `soulseek-rs-vX.Y.Z-aarch64-pc-windows-msvc.zip` | |
- rewrites `Formula/soulseek-rs.rb` in the `michel/homebrew-tap` repository so
`brew install michel/tap/soulseek-rs` picks up the new macOS and Linux archives.
`brew install michel/tap/soulseek-rs` picks up the new macOS and Linux archives,
- merges `master` back into `develop`, so the branch the work happens on carries the
new version and changelog rather than drifting behind them.
Both crates always share one version, one tag, and one changelog — see `release-plz.toml`.
The version lives in one place, `[workspace.package]` in the root `Cargo.toml`, and
release-plz owns it. Do not edit it by hand on `develop`: the back-merge relies on
`develop` never touching that line, and an edit there turns every release into a
conflict.
## Nightly builds
`.github/workflows/nightly.yml` builds the tip of `develop` at 02:17 UTC every