Skill v1.0.2
currentAutomated scan100/1003 files
name: dbflux-release description: > Prepare and create DBFlux releases under the trunk + short-lived release-branch model with git-cliff-generated changelogs and an automated nightly channel. Trigger: When user asks to create a release, bump version, tag a release, cut a release branch, or prepare release notes for DBFlux. license: MIT metadata: version: "1.0.2"
When to Use
- Cutting a release branch from
main - Tagging a release candidate (
-rc.N) or stable version (vX.Y.Z) from arelease/vX.Ybranch - Tagging a patch (
vX.Y.(Z+1)) from arelease/vX.Ybranch - Bumping versions in versioned artifacts (Cargo, Nix, Windows installer) and, on stable releases, the external AUR PKGBUILD
Do not use this skill to cut nightly builds — nightly is fully automated via .github/workflows/nightly.yml (daily cron, no manual steps).
Channels
| Channel | Tag pattern | Source branch | How it ships | |
|---|---|---|---|---|
| nightly | nightly (rolling) | main HEAD | Automated cron — no skill action needed | |
| rc | vX.Y.Z-rc.N | release/vX.Y | Tag push → CI | |
| stable | vX.Y.Z | release/vX.Y | Tag push → CI |
The -dev.N channel is retired. Do not create new -dev.N tags.
Changelog Model
Two artifacts: `CHANGELOG.md` in the repository is hand-curated, and the GitHub release body is generated by git-cliff from conventional commits. The skill edits the changelog only where the procedure below says so.
cliff.tomlat the repo root defines which commit types surface in the generated release body (feat,fix,perf) and which are dropped (chore,ci,docs,test,refactor,style).- Every user-visible change already added its
## [Unreleased]bullet in the PR that made it. The skill does not write those bullets. -rc.Nandnightlytags are transparent: they neither close the[Unreleased]window nor bound the generated range. git-cliff accumulates commits since the last stable tag.- At the stable promote the skill renames the top
## [Unreleased]heading to## [X.Y.0] - <date>(see "Promote to Stable"). Nothing generated is written intoCHANGELOG.mdthere. - Patch releases (
vX.Y.Z, Z > 0) do prepend a generated section withgit-cliff --prepend. Never rungit-cliff -o CHANGELOG.md— a full regeneration collapses all historical sections into one range from the last stable tag.
v0.7.0 transition: patch sections have been generated by git-cliff since v0.7.x. The## [0.6.0]and## [0.6.0-dev.N]sections are hand-written baselines inCHANGELOG.md. They must never be regenerated.
Branching Model (read first — every action depends on this)
DBFlux uses trunk + short-lived release branches.
| Branch | Lifetime | Accepts | Tags produced | |
|---|---|---|---|---|
main | permanent | every new commit (features, fixes, refactors) | (none — nightly is rolling) | |
release/vX.Y | until EOL | cherry-picked fixes only (no new features) | vX.Y.Z-rc.N, vX.Y.Z, vX.Y.(Z+1) |
Inviolable rules:
- A commit is never authored on a release branch. It always lands on
mainfirst and is thengit cherry-pick -x <sha>into the release branch. - A release branch is never merged back into
main. - No new features enter a release branch once cut. Only bugfixes and the version bumps the release requires.
mainis always open for development.
Tag → Source-Branch → GitHub Release Mapping
The release workflow (.github/workflows/release.yml — classify job) classifies tags automatically:
| Tag pattern | Allowed source branch | GitHub release kind | |
|---|---|---|---|
vX.Y.Z-rc.N | release/vX.Y | prerelease | |
vX.Y.Z | release/vX.Y | stable (published) | |
| anything else | (refuse) | draft (safety net) |
The skill MUST refuse to create a tag whose pattern does not match the current branch.
Context Detection (always do this first)
Before any tagging or bumping action:
git rev-parse --abbrev-ref HEADgit status --porcelaingit describe --tags --abbrev=0git tag --sort=-v:refname | head -n 10
Resolve the context:
- Branch is
main→ "dev mode". Allowed: cut a newrelease/vX.Y. - Branch matches
^release/v\d+\.\d+$→ "stabilization mode". Allowed:-rc.N, stablevX.Y.Z, patch bump. - Any other branch → abort. Ask the user to switch to
mainor the appropriate release branch.
Working tree must be clean before any tag.
Versioning Rules
Source-of-truth for the workspace version is Cargo.toml ([workspace.package].version). All other manifests must be kept in lockstep.
On `main`:
main always carries X.(Y+1).0-dev.0, where X.Y is the minor currently being stabilized on release/vX.Y. This marker is set when release/vX.Y is cut and stays until the next release branch is cut. The nightly workflow derives the nightly version from it: X.(Y+1).0-nightly+<sha>. No -dev.N releases are published — the marker is development-only.
On `release/vX.Y`:
- Next RC: if last tag on the branch is
vX.Y.Z-rc.N→-rc.(N+1). If none →-rc.0. - Promote to stable: drop the RC suffix →
vX.Y.0. - Patch: increment
Z→vX.Y.(Z+1). Never bump the minor on a release branch.
Cut Procedure: main → release/vX.Y
When stabilization for a minor begins:
- Verify you are on
main, clean tree, up to date withorigin/main. - Verify
.github/workflows/release.ymlonmaincontains theclassifyjob. If missing, fix onmainfirst; otherwise the release branch will inherit a broken workflow and stable tags will publish as drafts. - Confirm the target minor
vX.Ywith the user. - Create the branch:
``bash git checkout -b release/vX.Y ``
- On
release/vX.Y:
- Bump every versioned artifact to
X.Y.0-rc.0(see "Files to Bump"). - Do not touch
CHANGELOG.mdhere. The branch keeps the[Unreleased]block it inherited frommain; the rename happens at the stable promote. - Commit:
chore(release): cut release/vX.Y at vX.Y.0-rc.0. - Push:
git push -u origin release/vX.Y.
- Back on
main:
- Bump every versioned artifact to
X.(Y+1).0-dev.0(main now targets the next minor). - Commit:
chore(version): move main to X.(Y+1).0-dev.0 marker. - Push.
- Still on
main, register the minor on the website (see "Website"). Only after step 5's push: the ref must exist on origin or every site deploy frommainfails. Add the entry right afternightlyinweb/versions.json, withoutcurrent(an RC is not the current release):
``json { "id": "nightly", "ref": "main", "noindex": true }, { "id": "vX.Y", "ref": "release/vX.Y" }, { "id": "vX.(Y-1)", "ref": "release/vX.(Y-1)", "current": true }, ``
- Commit:
chore(web): add vX.Y to the site versions. - Push.
- Tag
vX.Y.0-rc.0on the release branch (see "Tag Procedure").
No CHANGELOG edit is needed at an RC. git-cliff generates RC notes from conventional commits automatically.
Promote to Stable
Run on release/vX.Y when the RC is clean:
- Bump every versioned artifact from
X.Y.0-rc.NtoX.Y.0. - Rename the top
CHANGELOG.mdheading from## [Unreleased]to## [X.Y.0] - <today>, in the same commit as the version bump. Do not prepend a generated section here, and do not rungit-cliff -o CHANGELOG.md.
``text ## [Unreleased] -> ## [X.Y.0] - 2026-07-31 ``
The release job fails if this section is missing for the tag, so the step cannot be skipped silently.
- Commit:
chore(release): promote release/vX.Y to vX.Y.0. - Tag
vX.Y.0on the release branch and push branch + tag. - CI generates the stable release body via git-cliff (all user-visible commits since the previous stable tag).
- On
main, makevX.Ythe site's current release: inweb/versions.json, move"current": truefromvX.(Y-1)tovX.Y.
``json { "id": "vX.Y", "ref": "release/vX.Y", "current": true }, { "id": "vX.(Y-1)", "ref": "release/vX.(Y-1)" }, ``
- Commit:
chore(web): make vX.Y the current site version. - Push. The site deploys from
main, so this switches/docs/tovX.Yand the product version shown on the landing and compare pages toX.Y.0.
After the GitHub Release publishes, run post-release steps (see "Post-Release Channels").
Next Dev Cycle
main is bumped to X.(Y+1).0-dev.0 when release/vX.Y is cut (step 6 of the Cut Procedure). No further bump to main is needed after the stable tag ships. main has already been targeting the next minor throughout stabilization.
Tag Procedure (any tag)
- Run local validation:
``bash cargo check --workspace python3 scripts/lint.py fmt --check python3 scripts/lint.py clippy cargo test --workspace ``
scripts/lint.py covers only the first-party crates under crates/ and never lints or reformats the vendored crates under vendor/.
- Confirm the versioned files match the tag exactly.
- Create an annotated tag:
``bash git tag -a vX.Y.Z[-suffix.N] -m "vX.Y.Z[-suffix.N]" git push origin vX.Y.Z[-suffix.N] ``
- The GitHub Actions release workflow takes over (build, git-cliff notes, publish/prerelease).
- Only after the workflow completes and the release is verified, do the post-release steps.
Files to Bump
These must all carry the exact same version number per release:
Cargo.toml—[workspace.package].version. Workspace crates inherit viaversion.workspace = true.flake.nixresources/windows/installer.iss- Review (does not inherit workspace version):
examples/custom_driver/Cargo.toml.
Post-release (requires published artifacts):
nix/release-info.nix— see "Nix Bump" below.
Not per release: web/versions.json changes only at the cut, the stable promote and the EOL of a minor (see "Website").
Website
web/versions.json lists the documentation sets the site publishes, one per minor (fields documented in web/src/data/versions.ts). Every change is a commit on main, because the site deploys from main (.github/workflows/web.yml).
| Event | Change | Commit | |
|---|---|---|---|
Cut (release/vX.Y pushed) | add { "id": "vX.Y", "ref": "release/vX.Y" } right after nightly | chore(web): add vX.Y to the site versions | |
Stable (vX.Y.0 tagged and pushed) | move "current": true to vX.Y | chore(web): make vX.Y the current site version | |
EOL (before release/vX.Y is deleted) | repoint vX.Y's ref to its last tag, e.g. vX.Y.Z | chore(web): pin vX.Y site docs to vX.Y.Z |
- The ref must exist on origin.
web/scripts/fetch-docs.tsskips an unreadable ref with a warning, then the build fails rendering that version (No materialised documentation for version "vX.Y"). - The product version is read from each ref's
Cargo.toml; never type it into the site. - Site copy describing features of
vX.Ylands onmainno earlier than the commit that makesvX.Ycurrent.
Cherry-Pick Discipline
A release branch should never contain commits that don't exist on main, except release-only commits (chore(release): ..., chore(version): ...).
# On main: land the fix.git checkout main# ...commit, push...# On release branch: cherry-pick with -x to record the source SHA.git checkout release/vX.Ygit cherry-pick -x <sha>
Sanity check: every non-release commit on release/vX.Y since branch-off should mention (cherry picked from commit ...) in its message.
Nix Bump
The flake exposes a prebuilt-binary package (dbflux-bin, default) backed by nix/release-info.nix. Refresh it after any published tag (rc or stable):
ver=X.Y.Z # or X.Y.Z-rc.Nfor arch in amd64 arm64; dohex=$(curl -fsSL "https://github.com/0xErwin1/dbflux/releases/download/v$ver/dbflux-linux-$arch.tar.gz.sha256" | awk '{print $1}')nix-hash --to-sri --type sha256 "$hex"done
Update nix/release-info.nix: version, both url lines, both hash lines.
Verify locally before committing:
nix build .#dbflux-bin --no-link --print-out-paths
AUR Bump
AUR is bumped only for stable tags (vX.Y.Z without suffix), in an external AUR repository (no PKGBUILD in this repo).
AUR pkgver does not allow -. For stable releases: pkgver=X.Y.Z (no translation needed).
Steps:
- Update
PKGBUILD:pkgver=X.Y.Z, resetpkgrel=1. - Regenerate
.SRCINFO:makepkg --printsrcinfo > .SRCINFO. - Commit + push to the AUR remote:
git commit -am "release: vX.Y.Z" && git push origin master.
Post-Release Channels
| Tag kind | GitHub Release | AUR | Nix flake (this repo) | nixpkgs (future) | |
|---|---|---|---|---|---|
-rc.N | prerelease | skip | bump release branch's + main's release-info | skip | |
Stable vX.Y.Z | published | bump + push | bump release branch's + main's release-info | bump + PR |
Anti-Patterns (explicit refusals)
Refuse, with a clear message, if any of these are requested:
- Tagging
vX.Y.ZorvX.Y.Z-rc.Nwhile HEAD is onmain. - Merging
release/vX.Yback intomain. - Creating new features (non-fix commits) on a
release/*branch. - Bumping minor or major version inside a
release/*branch. - Pushing a tag without the working tree being clean.
- Pushing the AUR bump with
pkgvercontaining a hyphen. - Creating a new
-dev.Ntag (this channel is retired; use nightly instead). - Running
git-cliff --prepend CHANGELOG.mdat a stable promote: that file is curated, and the heading rename is the only edit there.--prependbelongs to patch releases. - Cutting a
release/vX.Ybranch from amainHEAD where.github/workflows/release.ymlis missing theclassifyjob. - Marking an RC minor
"current": trueinweb/versions.json, or leaving the previous minor current aftervX.Y.0is published. - Adding a
web/versions.jsonentry before its ref is on origin, or deleting arelease/vX.Ybranch that an entry still points at.
Inspection Commands
# Current branch and cleanlinessgit rev-parse --abbrev-ref HEADgit status --porcelain# Most recent tag and last 10 tags by versiongit describe --tags --abbrev=0git tag --sort=-v:refname | head -n 10# Commits since last taggit log "$(git describe --tags --abbrev=0)"..HEAD --oneline# Preview what git-cliff would generate for the unreleased rangegit-cliff --config cliff.toml --unreleased --strip header# Cherry-pick provenance audit on a release branchgit log --grep='cherry picked from' release/vX.Y
Resources
.github/workflows/release.yml— classification logic and artifact publishing.github/workflows/nightly.yml— daily automated nightly build.github/workflows/build.yml— reusable build jobs.github/release-template.md— installation section appended to every release bodycliff.toml— git-cliff configurationCargo.toml,flake.nix,nix/release-info.nix,resources/windows/installer.issexamples/custom_driver/Cargo.toml(standalone, review manually)web/versions.json— documentation versions the site publishes, and which one is current