diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index fc64176..271053c 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -1,9 +1,13 @@ # Release: pushing a tag `vX.Y.Z` builds every distribution artifact and # publishes a Gitea release with the CHANGELOG section for that version as -# its notes. The artifact set is exactly what tools/release.sh --cross -# produces: host (Apple Silicon) + x86_64 macOS + static-musl Linux + -# RHEL 8-compatible linux-gnu + Windows binaries for both lucisv and -# lucisv-server, the platform-independent .vsix, and SHA256SUMS. +# its notes. What the release page carries is the six .vsix packages — +# the universal one plus darwin-arm64/darwin-x64/linux-x64/linux-arm64/ +# win32-x64 with the lucisv + lucisv-server binaries embedded — and +# SHA256SUMS; each platform package is a must, and a missing one fails +# the release. The loose binaries are still built for every target +# (the packages are made from them) and still audited, but they are not +# attached: anyone who wants a standalone binary builds it with +# `cargo build --release` (docs/features/editor-platform-vsix). # # The release fails, deliberately, when the tag does not match the # workspace version or CHANGELOG.md has no section for it: every release @@ -30,6 +34,26 @@ jobs: echo "tag $GITHUB_REF_NAME does not match crate version $v" >&2 exit 1 } + # The release page ships extension packages only. All six must exist + # (release.sh would have failed earlier, but a missing package here is + # exactly the failure this release exists to prevent, so it is checked + # by name); the loose binaries were needed to build and audit them and + # are dropped now. SHA256SUMS is filtered, not recomputed — the + # published hashes are the audited ones — and re-verified after. + - name: Keep only the extension packages + run: | + v=${GITHUB_REF_NAME#v} + cd dist + for t in "" -darwin-arm64 -darwin-x64 -linux-x64 -linux-arm64 -win32-x64; do + [ -f "lucisv-$v$t.vsix" ] || { + echo "missing lucisv-$v$t.vsix" >&2 + exit 1 + } + done + grep '\.vsix$' SHA256SUMS > SHA256SUMS.tmp + mv SHA256SUMS.tmp SHA256SUMS + find . -type f ! -name '*.vsix' ! -name SHA256SUMS -delete + shasum -a 256 -c SHA256SUMS - name: Extract the release notes from CHANGELOG.md run: tools/release_notes.sh "${GITHUB_REF_NAME#v}" > dist/RELEASE_NOTES.md - name: Create the release and attach the artifacts diff --git a/README.md b/README.md index 92aa034..9cc5be6 100644 --- a/README.md +++ b/README.md @@ -610,30 +610,39 @@ go-to-definition, references and document/workspace symbols — the full list, and what is deliberately *not* advertised yet, is in `docs/features/lucisv-server/README.md`. -**The binary comes from the same build as the CLI.** Download it from the -[releases page](https://git.luci.ooo/lucio/lucisv/releases) for your -platform, or build it yourself: +**VS Code needs no separate binary**: every release on the +[releases page](https://git.luci.ooo/lucio/lucisv/releases) carries a +platform-specific `.vsix` with both binaries inside it — pick yours +(`darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`) +and sideload it: + +```bash +code --install-extension lucisv--darwin-arm64.vsix +``` + +Every other editor (and the universal `lucisv-.vsix`, the fallback +for platforms not listed) finds `lucisv-server` on `PATH`; the binary comes +from the same build as the CLI: ```bash cargo build --release # target/release/lucisv-server (and target/release/lucisv) cp target/release/lucisv-server ~/.local/bin/ # anywhere on PATH ``` -Every editor below defaults to finding `lucisv-server` on `PATH`; each also -accepts an absolute path if you would rather leave the binary in `target/`. +Each editor also accepts an absolute path if you would rather leave the +binary in `target/`. **VS Code** — a thin extension in `editors/vscode/` whose entire job is -registering the file types and starting the server: +registering the file types and starting the server (bundled, from `PATH`, or +from the `lucisv.serverPath` setting). To build the packages yourself: ```bash -tools/release.sh # builds dist/lucisv-.vsix -code --install-extension dist/lucisv-.vsix +tools/release.sh # dist/lucisv-.vsix + the host platform package +code --install-extension dist/lucisv--darwin-arm64.vsix ``` -The `.vsix` is also attached to every release on the -[releases page](https://git.luci.ooo/lucio/lucisv/releases). Sideloading it -is the supported install; the extension is not on any marketplace. To package it by hand instead: `cd editors/vscode && npm ci && -npx @vscode/vsce package`. +Sideloading is the supported install; the extension is not on any +marketplace. Settings are listed in `editors/vscode/README.md`, along with the full steps, the F5 development flow and troubleshooting. @@ -694,14 +703,18 @@ expected outputs with `UPDATE_SNAPSHOTS=1 cargo test -p vlog_formatter`. Prebuilt downloads live on the [releases page](https://git.luci.ooo/lucio/lucisv/releases): every tagged -version carries `lucisv` and `lucisv-server` for Apple Silicon and Intel -macOS, static-musl and RHEL 8-compatible glibc Linux, and Windows, plus the -`.vsix` and a `SHA256SUMS` to verify them with -(`shasum -a 256 -c SHA256SUMS`). Copy the two binaries onto your `PATH` and -sideload the extension with `code --install-extension`. The macOS binaries -are smoke-tested on the build machine; the Linux and Windows ones are -cross-built and audited (file type, dynamic-linkage, glibc-version ceiling), -not executed — there is no Linux or Windows machine in the loop. +version carries **six `.vsix` packages** — platform-specific ones for +Apple Silicon and Intel macOS, x86-64 and ARM64 Linux (static musl) and +Windows, each with `lucisv` and `lucisv-server` embedded, plus the +universal no-binary fallback — and a `SHA256SUMS` to verify them with +(`shasum -a 256 -c SHA256SUMS`). Sideload the one for your machine with +`code --install-extension`. Standalone binaries are not published; build +them with `cargo build --release` (or `tools/release.sh --cross` for the +full set — the release binaries are cut from the same scripts). The macOS +binaries inside the packages are smoke-tested on the build machine; the +Linux and Windows ones are cross-built and audited (file type, +dynamic-linkage, glibc-version ceiling), not executed — there is no Linux +or Windows machine in the loop. To build the same artifact set yourself: diff --git a/docs/features/ci-release/README.md b/docs/features/ci-release/README.md index 7e1e7bd..8acd50e 100644 --- a/docs/features/ci-release/README.md +++ b/docs/features/ci-release/README.md @@ -5,11 +5,18 @@ Automate the checks and the release. Every push to master runs the three checks CLAUDE.md requires (fmt, clippy, test) on Gitea Actions; every tag `vX.Y.Z` builds the full cross-platform artifact set (Apple Silicon + -x86_64 macOS, static-musl and RHEL 8-compatible Linux, Windows — both -binaries each — plus the `.vsix` and `SHA256SUMS`) and publishes a Gitea -release whose notes are the CHANGELOG section for that version. The point -is that a release is one `git tag` + `git push` and cannot ship without -green checks, matching versions, and written notes. +x86_64 macOS, static-musl x86-64/ARM64 and RHEL 8-compatible Linux, +Windows — both binaries each — plus the six `.vsix` packages and +`SHA256SUMS`) and publishes a Gitea release whose notes are the CHANGELOG +section for that version. **Published assets are the six `.vsix` packages +only** (since 2026-08-27, owner decision): the extension is the product a +release delivers, each platform package is checked by name before +publishing, and the loose binaries — still built and audited, since the +packages embed them — stay unpublished; a standalone binary is +`cargo build --release` for whoever wants one +(docs/features/editor-platform-vsix). The point is that a release is one +`git tag` + `git push` and cannot ship without green checks, matching +versions, written notes, and all six packages. ## Assumptions @@ -38,8 +45,11 @@ green checks, matching versions, and written notes. ## Handshakes - Consumes `tools/release.sh --cross` unchanged: artifact names - (`lucisv[-server]--[.exe]`, `lucisv-.vsix`, - `SHA256SUMS`) and the version-from-binary convention. + (`lucisv[-server]--[.exe]`, + `lucisv-[-].vsix`, `SHA256SUMS`) and the + version-from-binary convention. The workflow's pruning step depends on + those `.vsix` names exactly — it checks all six by name and filters + `SHA256SUMS` down to `.vsix` lines before publishing. - Consumes `CHANGELOG.md`'s heading convention: `## — `; `tools/release_notes.sh` keys on the second word of `## ` headings. - `tools/publish_release.sh` expects the GitHub-compatible CI environment @@ -68,6 +78,13 @@ green checks, matching versions, and written notes. automates what RELEASING.md documented as manual; Linux/Windows binaries remain audited, never executed (no such machine in the loop, and no container runtime on the runner). +- [x] Publish `.vsix` packages only (2026-08-27): after the audit, the + workflow asserts all six packages exist by name, filters `SHA256SUMS` + down to them (keeping the audited hashes), re-verifies it, and deletes + the loose binaries from `dist/` so `publish_release.sh` attaches only + the packages. Prune logic tested locally against a real `--cross` + `dist/`, with a negative control (one package removed → the step fails + naming it). - [ ] A second runner on a non-macOS host, if native-built (rather than cross-built) Linux artifacts are ever wanted. @@ -92,6 +109,24 @@ green checks, matching versions, and written notes. rejected: no container runtime exists on the runner Mac, and installing a VM stack is an owner decision, not a CI increment. +- 2026-08-27 — lead. Owner decision: the release page ships the six + `.vsix` packages only (each platform package a must, checked by name; + the universal fallback included), no loose binaries — the platform + packages embed them, and an experienced user builds standalone binaries + with cargo. Implemented as a "Keep only the extension packages" step in + `release.yml` between the artifact audit and the notes extraction: the + audit still sees (and gates on) the loose binaries, then the step + filters `SHA256SUMS` to `.vsix` lines — the published hashes are the + audited ones, not recomputed — deletes everything else from `dist/`, + and re-runs `shasum -c`. `publish_release.sh` is untouched: it attaches + whatever `dist/` holds. Tested against the real 0.10.0 `--cross` dist + (six packages verify, correct survivors) and negative-controlled (one + package removed → fails naming `lucisv-0.10.0-linux-arm64.vsix`). Docs + trued up: RELEASING.md (publishing + CI sections), top-level README + (Editor setup and Install-and-releases sections now lead with the + platform package and say binaries are build-your-own), and this README's + Goal/Handshakes/Status. + ## QA log _(no QA round — infrastructure, verified by the live v0.7.1 run; see work log)_ diff --git a/docs/features/editor-platform-vsix/README.md b/docs/features/editor-platform-vsix/README.md index 9d64716..ed0b8eb 100644 --- a/docs/features/editor-platform-vsix/README.md +++ b/docs/features/editor-platform-vsix/README.md @@ -284,6 +284,16 @@ README sentence is exactly true. Two lines plus a comment; `node --check` clean. Lead-authored directly — the dev/QA loop would add latency, not safety (precedent: the 0.4.2 entry in docs/features/editor-packaging). +### 2026-08-27 — lead (follow-up): the release publishes the packages only + +Owner decision, implemented in the ci-release feature (see +docs/features/ci-release/README.md, 2026-08-27 work log entry): the release +page now carries the six `.vsix` packages and `SHA256SUMS` only. The loose +per-triple binaries are still built and audited — the packages are made from +them — but no longer attached; standalone binaries are build-your-own. +Nothing in this feature's scripts changed: `release.sh` still produces the +full `dist/`, and the pruning lives in `release.yml` after the audit. + ## QA log ### 2026-08-27 — QA agent diff --git a/tools/RELEASING.md b/tools/RELEASING.md index 95d1476..a015ef5 100644 --- a/tools/RELEASING.md +++ b/tools/RELEASING.md @@ -207,9 +207,10 @@ optional. Pick the package by machine — `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64` — and fall back to the universal `lucisv-.vsix` anywhere else. -Publishing the artifacts is a matter of attaching `dist/`'s contents plus -`SHA256SUMS` to a git tag / release page on `git.luci.ooo`. Tag after the -gate is green: +Publishing means attaching the six `.vsix` packages plus `SHA256SUMS` to a +git tag / release page on `git.luci.ooo` — the CI release does exactly that +and nothing more (the loose binaries stay unpublished; see "CI releases" +below). Tag after the gate is green: ```bash git tag -a v0.5.0 -m 'lucisv 0.5.0' @@ -263,11 +264,16 @@ git push origin v ``` does the rest on the `mac-arm64` runner: `tools/release.sh --cross`, a -tag-vs-`lucisv --version` consistency check, `tools/release_notes.sh` (a -missing CHANGELOG section fails the release), and -`tools/publish_release.sh`, which creates the Gitea release and attaches -every `dist/` artifact. Ordinary pushes run fmt/clippy/test via -`.gitea/workflows/ci.yml`. +tag-vs-`lucisv --version` consistency check, a pruning step that keeps +**only the six `.vsix` packages** in `dist/` (each checked by name — a +missing platform package fails the release — and `SHA256SUMS` filtered +down to them and re-verified), `tools/release_notes.sh` (a missing +CHANGELOG section fails the release), and `tools/publish_release.sh`, +which creates the Gitea release and attaches what remains. The loose +binaries are built and audited on the runner — the packages are made +from them — but never published: a standalone binary is a +`cargo build --release` away for whoever wants one. Ordinary pushes run +fmt/clippy/test via `.gitea/workflows/ci.yml`. The runner is this Mac: `brew install gitea-runner`, registered instance-wide as `mac-arm64` (labels `macos-arm64`/`self-hosted`, host