CONTRIBUTING.md: document single-trunk + RC-tag release model

This commit is contained in:
Breadway 2026-07-31 11:08:41 +08:00
parent 3caad809a3
commit 4f0fe2571d

View file

@ -7,16 +7,10 @@ workflow described here.
## Branches ## Branches
- **`main`** — release branch, always tag-ready. Nothing is committed to it There is one long-lived branch: **`main`**. All day-to-day work lands here.
directly; it only moves forward via a `beta` merge (see below). Every push to `main` automatically builds and publishes a **dev-track**
- **`dev`** — integration branch. All day-to-day work lands here first. build for both products (see Tracks below) — use this to test your change
Every push to `dev` automatically builds and publishes a **dev-track** in a real install before cutting anything more formal.
build (see Tracks below) — use this to test your change in a real install
before it goes any further.
- **`beta`** — a frozen stabilization branch, cut from `dev` periodically.
Every push to `beta` automatically builds and publishes a **beta-track**
build. While a freeze is active, only fixes for issues found *in that
freeze* should land on `beta`.
New work — features and bug fixes alike — goes on a short-lived branch: New work — features and bug fixes alike — goes on a short-lived branch:
@ -25,28 +19,35 @@ feature/<short-name>
fix/<issue-number-or-short-name> fix/<issue-number-or-short-name>
``` ```
Branch off `dev`, open a PR/push back into `dev` when ready. If you're fixing Branch off `main`, open a PR/push back into `main` when ready. Short-lived
something reported against an active `beta` freeze, branch off `beta` branches get deleted on merge — they never accumulate the kind of drift a
instead, merge the fix there to unblock testers, and also forward the same second long-lived branch does.
fix into `dev` so it doesn't quietly reappear next cycle.
## The release cycle ## The release cycle
1. Work accumulates on `dev` via `feature/x` / `fix/x` branches. Each push There's no separate `beta` or release branch — "stable" and "beta" are both
auto-publishes a dev build — install it with `bakery track set dev` and just **tags** on `main`, not branches that need to be kept in sync:
`bakery update --all`, then report or fix anything broken with another
push to `dev`. 1. Work accumulates on `main` via `feature/x` / `fix/x` branches. Each push
2. Once `dev` has gone roughly **a week** without new issues, `beta` is cut auto-publishes a dev build for both `bakery` and `bread-theme` — install
fresh from `dev`'s current tip. This freezes it as the stabilization with `bakery track set dev` and `bakery update --all`, then fix anything
target — `dev` keeps moving independently starting the next cycle. broken with another push.
3. `beta` is open for anyone to test: `bakery track set beta` and 2. When you want to stabilize before a real release, tag a release
`bakery update --all`. **File issues against anything you find on this candidate: `git tag vX.Y.Z-rc.1 && git push origin vX.Y.Z-rc.1` (push to
repo's Forgejo issue tracker.** Fixes land via `fix/<issue>` branches both remotes). That tag alone triggers a beta-track build —
merged into `beta`. "freezing" is just pausing pushes to `main` while you test it, not a
4. Once `beta` has gone roughly **a month** without new issues, it's merged branch operation. Cut `-rc.2`, `-rc.3`, etc. for further fixes.
into `main` and tagged `vX.Y.Z` — that tag is what actually triggers the 3. Once an RC has gone without issues, tag the real release:
stable release build. `beta` is then reset from `dev` to start the next `git tag vX.Y.Z && git push origin vX.Y.Z` — that's what triggers the
cycle. signed stable release build.
**Note**: `bakery` and `bread-theme` share the same `v*` tag pattern
(both `release-bakery.yml` and `release-bread-theme.yml` trigger on
`tags: ['v*']`, pre-existing behavior this doc isn't changing) — a single
tag push builds and publishes a release for *both* products at once. If
you ever need to release one independently of the other, that's a real gap
worth fixing in the workflow files themselves, not something to work around
by hand.
## Tracks, from a user's perspective ## Tracks, from a user's perspective
@ -58,14 +59,15 @@ bakery update --all # pull the latest build on your current track
| Track | What it is | Published from | | Track | What it is | Published from |
|--------|-----------|-----------------| |--------|-----------|-----------------|
| `stable` | The last tagged release | `main`, on a `vX.Y.Z` tag push | | `stable` | The last tagged release | a `vX.Y.Z` tag |
| `beta` | Current stabilization freeze | `beta`, on every push | | `beta` | Latest release candidate | a `vX.Y.Z-rc.N` tag |
| `dev` | Bleeding edge | `dev`, on every push | | `dev` | Bleeding edge | `main`, on every push |
Dev/beta versions are auto-computed (`X.Y.Z-dev.<timestamp>+<sha>` / Dev versions are auto-computed (`X.Y.Z-dev.<timestamp>+<sha>`) from the
`-beta.…`) from the latest published stable tag, so they always sort as latest published stable tag, so they always sort as newer than what you
newer than what you have installed — no manual version bumping needed when have installed — no manual version bumping needed. Beta versions are just
pushing to `dev` or `beta`. the RC tag itself (already valid semver, already sorts below the real
release it's a candidate for).
## Local development ## Local development
@ -79,11 +81,13 @@ Run the same commands with `-p bread-theme --bin bread-theme` for that crate.
## CI ## CI
- `dev-bakery.yml` / `dev-bread-theme.yml` — triggered on push to `dev`. - `dev-bakery.yml` / `dev-bread-theme.yml` — triggered on push to `main`.
- `beta-bakery.yml` / `beta-bread-theme.yml` — triggered on push to `beta`. - `rc-bakery.yml` / `rc-bread-theme.yml` — triggered on any `vX.Y.Z-rc.N`
- `release-bakery.yml` / `release-bread-theme.yml` — triggered on a `v*` tag tag push.
push, cuts the actual stable release. - `release-bakery.yml` / `release-bread-theme.yml` — triggered on any other
- `package.yml` — publishes to the `[breadway]` pacman repo, also tag-triggered. `v*` tag push, cuts the actual stable release.
- `package.yml` — publishes `bakery` to the `[breadway]` pacman repo, also
tag-triggered.
All CI runs on a self-hosted runner; nothing runs automatically on plain All CI runs on a self-hosted runner; nothing runs automatically on plain
commits or PRs beyond the track builds above. See commits or PRs beyond the track builds above. See