chore(release): 0.3.0 release pipeline, CI, and version gate - #16
Merged
Merged
Conversation
The last tag (v0.2.11) predates the Zig 0.16 migration, the credential security audit, and the command-surface expansion, and the four version manifests had already drifted apart (0.2.10 vs 0.2.11). Nothing published those commits and nothing would have caught the drift. - scripts/check-versions.sh: fail-closed gate over package.json, .claude-plugin/plugin.json, npm/*/package.json and the wrapper's optionalDependencies pins. Observed red against the real 0.2.10/0.2.11 drift before the bump. - Bump all manifests to 0.3.0. The tag stays the source of truth for the binary: build.zig derives --version from `git describe --tags`. - .github/workflows/ci.yml: the repo had no CI at all. fmt check, unit suite, the npm cross-compile targets (never exercised by `zig build test`, so a target break only showed up at release time), and the version gate. - release.yml: adds per-platform GitHub release tarballs (linear-<version>-<os>-<arch>.tar.gz + .sha256, macOS/Linux on both arches, Linux static musl) so mise's github: backend can track this tool across the fleet. Runs the version gate before publishing rather than after, sets fetch-depth: 0 so the published binary reports the tag instead of a bare hash, and restores the executable bit that upload-artifact drops. - CHANGELOG.md for 0.3.0, README Install section, and repo URLs moved to the current owner (npm scope stays @0xbigboss). Verified: zig fmt --check, zig build test, check-versions --expect 0.3.0, and all four release tarballs built and unpacked locally (macOS arm64 binary runs; Linux assets statically linked).
The new CI caught it on its first run: `zig build test` has never been able to compile on Linux. src/tests/main.zig calls libc setenv/unsetenv and rebuilds its view of the environment from `std.c.environ` — the 0.16 migration's answer to `main` receiving a stale `envp` snapshot — but the test module never declared a libc dependency. macOS links libSystem implicitly, so every local run passed and the gap stayed invisible until a Linux runner tried it. `.link_libc = true` on the test root module only. The exe stays libc-free. src/commands/auth.zig carried an unused `@cImport(termios.h)` left over from the migration. `@cImport` is lazily evaluated, so it never forced a libc dependency on the exe — which is exactly why nothing complained. Removed rather than left as a latent one on a stdlib-only project. Verified: `zig build test` passes on macOS, and the test binary now compiles for x86_64-linux-musl and x86_64-linux-gnu (the run step fails only because the host cannot execute Linux binaries; before this change it failed at compile with "dependency on libc must be explicitly specified").
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last tag (v0.2.11) predates PR #14 (Zig 0.16 migration, 9 security fixes, feature parity) and PR #15 (pi package) — none of that work is published. The four version manifests had also drifted apart (0.2.10 vs 0.2.11), and nothing in the repo would have caught it.
What this adds
scripts/check-versions.sh— fail-closed gate overpackage.json,.claude-plugin/plugin.json,npm/*/package.json, and the wrapper'soptionalDependenciespins. Observed red against the real drift before the bump:.github/workflows/ci.yml— the repo had no CI at all, only a tag-triggered release. Runszig fmt --check, the unit suite, the version gate, and the npm cross-compile targets (never exercised byzig build test, so a target-specific break only showed up at release time).release.yml— now cuts a GitHub release with per-platform tarballs (linear-<version>-<os>-<arch>.tar.gz+.sha256; macOS and Linux on both arches, Linux static musl) alongside the existing npm publish. Naming mirrors zmx andalleneubank/agent-statusline, which is the shape mise'sgithub:backend resolves per platform — this is what lets the tool be fleet-tracked via mise instead of hand-installed.Three defects fixed in the existing workflow while there:
fetch-depth: 0—build.zigderives--versionfromgit describe --tags, so a shallow clone made published binaries report a bare commit hash.chmod +xafterdownload-artifact, which does not preserve the mode — the packaged binary has to stay executable for the npm wrapper.Docs —
CHANGELOG.mdfor 0.3.0, a READMEInstallsection (npm / mise / direct download / source), the stale-Drelease-safebuild flag corrected to-Doptimize=ReleaseSafe, repo URLs moved to the current owner (npm scope stays@0xbigboss), and the release contract recorded inCLAUDE.md.Version
0.3.0 rather than a patch: the unreleased work removes
--api-key, changes the defaults ofauth show,issue view, andgql, and redefinessearch --fields.Verification
zig fmt --check build.zig src— cleanzig build test— pass./scripts/check-versions.sh --expect 0.3.0— pass (and red before the bump)linear