feat(release): attach downloadable binaries to GitHub releases (standalone CLI + npm tarballs) - #11859
feat(release): attach downloadable binaries to GitHub releases (standalone CLI + npm tarballs)#11859roninjin10 wants to merge 1 commit into
Conversation
…OS#11858) Releases only carried GitHub's auto-generated source archives: release.yaml created them with no `files:`, the npm tarballs it already builds were discarded, and desktop installers only build for stable tags. - Compile standalone `elizaos` CLI executables for macOS/Linux/Windows × arch via `bun build --compile` (packages/elizaos/build-standalone.ts). - Make the CLI compiled-aware: inside a bun binary `import.meta.url` points into the unreadable `/$bunfs` root, so getPackageRoot() now resolves templates/manifest/package.json next to the executable (isStandaloneBinary). - Emit the real npm `.tgz` tarballs for the headline packages + checksums (packages/scripts/pack-release-artifacts.mjs), matching what npm publishes. - release.yaml stages both + a combined SHA256SUMS and attaches them to beta releases and to stable production releases. - Regression coverage: src/package-info.test.ts (unit) and scripts/standalone-smoke.mjs (compiles the host binary and drives version/info/create end-to-end). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as superseded by #11869, which carries the same validated change rebased onto current develop from an upstream branch. |
Closes #11858
Problem
Every entry on https://github.com/elizaOS/eliza/releases carries only GitHub's auto-generated Source code (zip/tar.gz) — no downloadable binaries.
release.yamlcreates beta releases viasoftprops/action-gh-releasewith nofiles:attached, the npm.tgztarballs it already builds are discarded, and desktop installers (release-electrobun.yml) only build for stable tags.What this does
Stages real artifacts during the release job and attaches them to the GitHub Release (both the workflow-dispatch beta path and the stable
releaseevent):elizaosCLI executables — single-file binaries cross-compiled withbun build --compilefor macOS (arm64/x64), Linux (x64/arm64), Windows (x64), archived aselizaos-<platform>.tar.gz/.zip. Download-and-run, no npm/Bun required..tgzfor the headline packages (elizaos,@elizaos/core,@elizaos/agent,@elizaos/app-core) +SHA256SUMS-npm.txt. (--allpacks all 156 public packages; default is curated to keep the release page readable.)SHA256SUMS.txtacross every attached artifact.Key fix — compiled-aware asset resolution
A
bun --compilebinary serves its modules from the unreadable/$bunfsvirtual root, soimport.meta.url(and the CLI'sgetPackageRoot()) can't findtemplates/,templates-manifest.json, orpackage.json— the naive binary dies withENOENT /$bunfs/package.json.package-info.tsnow detects the compiled case (isStandaloneBinary()) and resolves those assets next to the real executable;build-standalone.tsstages them into each archive.Desktop installers
Already built and attached to stable releases by
release-electrobun.yml. Per-beta desktop builds are intentionally left off (4 platforms × ~150 min + Apple/Windows signing per beta, which currently ships every few hours) — happy to enable behind a repo variable if wanted.Files
packages/elizaos/src/package-info.ts—isStandaloneBinary()+ compiled-awaregetPackageRoot()packages/elizaos/build-standalone.ts— cross-compile + stage + archive all targetspackages/scripts/pack-release-artifacts.mjs— emit real npm tarballs + checksums (headline /--all/--packages).github/workflows/release.yaml— stage artifacts + attach to beta and stable releasespackages/elizaos/src/package-info.test.ts— unit regression for asset resolutionpackages/elizaos/scripts/standalone-smoke.mjs(test:standalone) — E2E: compile host binary, runversion/info/createEvidence (local)
Cross-compile all 5 targets from one host (18s):
Standalone binary E2E (
bun run test:standalone) — extracts the archive and drives the real binary:Before this change the same binary failed with
ENOENT: no such file or directory, open '/$bunfs/package.json'.npm tarball emit:
elizaos-2.0.3-beta.7.tgz(2.1 MB, 282 files) +SHA256SUMS-npm.txt; unknown-package request exits non-zero (no silent drop).Checks:
actionlintclean onrelease.yaml;bun run --cwd packages/elizaos typecheckclean;lint:checkclean;package-info.test.ts3/3 pass.Evidence N/A
packages/app/surface.🤖 Generated with Claude Code