Raven-1/RELEASING.md
KT 7c10b6b295
docs: align the release notes template and quick start with the web-first install flow (#760)
## Summary

The release notes template that CI prefills into every release draft,
the structure sketch of the same sections in RELEASING.md, and the quick
start's upgrade recipe still described the 0.1.13 finish line. Since
then both installers end by opening Raven in the browser, where
first-run setup now happens; `raven upgrade` installs the plugin wheels
too; rerunning the installer cannot pick up a pre-release, since it
resolves `releases/latest`; and a release ships three plugin wheels plus
`raven-constraints.txt` and `raven-plugins.txt` beside the wheel and
sdist. Both files now say so.

The Upgrade section of the template and the "Update a one-line install"
recipe in docs-site/docs/quick-start.md and quick-start.zh.md are
written to match the upgrade code: stop the page, run `raven upgrade`,
and start Raven again only after the upgrade has finished. On Linux and
macOS the command execs the helper in the foreground and returns when
the install is done; on native Windows it spawns the helper and returns
at once, and a `raven web` started before the completion message runs
into the install marker and exits 75. `raven upgrade` installs the
latest stable release unless the install has joined the beta channel, in
which case it installs that channel's pre-release.

Each claim was checked against the v0.2.0 tree: the launch sections of
install.sh and install.ps1, the `web` command and
`_refuse_incomplete_install` in raven/cli/serve_commands.py,
`_handoff_upgrade` and `fetch_latest_for_channel` in
raven/updates/upgrade.py, the first-run gate in ui-web/src/app/boot.ts,
and the asset list in .github/workflows/release.yml.

The 0.2.0 draft is edited in place; this change only reaches the drafts
CI creates from now on. The `__VERSION__` and `__TAG__` placeholders and
the two TODO markers the release job and the notes step rely on are
unchanged.

## Type

- [ ] Fix
- [ ] Feature
- [x] Docs
- [ ] CI / tooling
- [ ] Refactor
- [ ] Other

## Verification

- `git diff --stat origin/main..HEAD`:
.github/release-notes-template.md, RELEASING.md,
docs-site/docs/quick-start.md, docs-site/docs/quick-start.zh.md
- `npx commitlint --from origin/main --to HEAD --config
commitlint.config.cjs`: exit 0
- `PYTHONPATH=. python scripts/check_commit_messages.py
origin/main..HEAD`: exit 0
- `PYTHONPATH=. python scripts/check_source_language.py
origin/main..HEAD`: exit 0
- Non-ASCII scan of the template and RELEASING.md: nothing found (the zh
quick start page is Chinese by design)
- No tests run: markdown only; the one code consumer is the sed in
release.yml, whose placeholders are unchanged. The docs build runs in
CI.

- [ ] Relevant tests pass locally
- [x] Relevant lint / type checks pass locally
- [x] User-facing docs or screenshots are updated when needed

## Risk

Documentation only. Rollback is reverting the commits; the next tagged
release then prefills the old text again.

- [ ] Security impact considered
- [x] Backward compatibility considered
- [x] Rollback path is clear for risky changes

## Related Issues

N/A

---------

Co-authored-by: Claude (claude-fable-5-1) <noreply@anthropic.com>
2026-09-24 02:17:40 +08:00

98 lines
4.0 KiB
Markdown

# Releasing Raven
How a new Raven version is cut and published.
## Versioning
- Semantic versioning `MAJOR.MINOR.PATCH`. The source of truth is `version` in
`pyproject.toml`.
- Tags: `vX.Y.Z` for a stable release, `vX.Y.Z-rcN` for a pre-release. The tag
must match the `pyproject.toml` version -- CI enforces this (`release.yml`).
- For a pre-release, keep `pyproject.toml` at the base version (e.g. `0.1.3`
while tagging `v0.1.3-rc1`); CI compares only the base. Do NOT set the
version to `0.1.3-rc1` -- that is not a version hatch will build.
## Release title
`Raven X.Y.Z (YYYY-MM-DD)` -- for example `Raven 0.1.3 (2026-07-08)`. The CI
draft fills this in automatically (date is the build date; adjust when
publishing if needed).
## Release notes
Notes are hand-written and curated. The CI draft prefills the boilerplate
(Install, Release Status, Notes); a human writes the one-line summary and the
Highlights before publishing. Structure:
```
<one-line summary>
## Highlights
- <user-facing change>
## Install
install.sh one-liner for Linux / macOS / WSL2
install.ps1 one-liner for native Windows (plus the PowerShell 5.1 direct URL)
then: the installer ends on `raven web` (first-run setup is on that page);
`raven` for the TUI, `raven onboard` to reconfigure
## Upgrade
raven web --stop, raven upgrade, then raven web once the upgrade has finished,
with its limits (latest stable unless on the beta channel, plugin wheels
included, editable checkouts untouched, foreground on POSIX, external helper
on native Windows)
## Release Status
- Version: `X.Y.Z`
- Tag: `vX.Y.Z`
- Stability: <public preview patch | public preview minor | ...> # fill by hand per release type
- Assets: wheel, source distribution, the three plugin wheels, locked
constraints (`raven-constraints.txt`) and the plugin list (`raven-plugins.txt`)
## Notes
- pre-1.0 evolution caveat
- PyPI not enabled; install via the GitHub Release wheel
```
`Stability` is not boilerplate -- set it by release type (patch / minor / rc).
## Flow
1. Bump `version` in `pyproject.toml`, run `uv lock`, then open a PR; merge to `main`.
2. `git tag vX.Y.Z && git push origin vX.Y.Z`.
3. CI (`release.yml`) builds the wheel + sdist, exports the locked constraints
from `uv.lock` (`uv export --locked`, which fails the release if the lock is
stale vs pyproject), and creates a **draft** GitHub Release with all three
attached, titled and prefilled from the template.
4. Fill the summary + Highlights in the draft, then click **Publish**.
Publishing makes it `/releases/latest`, which `install.sh` serves.
While a release is a draft, GitHub addresses it as
`releases/tag/untagged-<hash>` -- even though the tag already exists, since CI
only runs after the tag is pushed. Publishing moves the release to
`releases/tag/vX.Y.Z` and leaves the old URL serving its own stale page with no
redirect. So never share the draft URL: a reader who opens it after publication
sees "untagged" and concludes the tag is missing or the release never went out.
Link `releases/tag/vX.Y.Z` or `/releases/latest` instead; the release job prints
both URLs in its step summary.
## Pre-releases
- `vX.Y.Z-rcN` tags build a draft marked **pre-release**. A pre-release is never
`/releases/latest`, so `curl | sh` users are unaffected. Use an rc tag to
verify the release pipeline before cutting the stable tag; delete the rc
release and tag afterward.
## Notes
- `main` is squash-merge + PR-only. The release itself is not automated past the
draft: publishing is a deliberate human step.
- PyPI publishing is not wired up; the supported install path is the GitHub
Release wheel asset resolved by `install.sh`.
- `install.sh` / `install.ps1` pass `raven-constraints.txt` to
`uv tool install -c`, so a one-click install gets the exact locked versions we
test rather than re-resolving to the newest allowed by `pyproject.toml`. A
release older than this asset installs without pinning (the scripts degrade
gracefully). To lift a pin later, update `uv.lock` and cut a new release; the
install scripts need no change.