Skip to content

feat(release): attach downloadable binaries to GitHub releases (standalone CLI + npm tarballs) - #11859

Closed
roninjin10 wants to merge 1 commit into
elizaOS:developfrom
roninjin10:feat/release-binaries
Closed

roninjin10 wants to merge 1 commit into
elizaOS:developfrom
roninjin10:feat/release-binaries

Conversation

@roninjin10

Copy link
Copy Markdown
Contributor

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.yaml creates beta releases via softprops/action-gh-release with no files: attached, the npm .tgz tarballs 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 release event):

  1. Standalone elizaos CLI executables — single-file binaries cross-compiled with bun build --compile for macOS (arm64/x64), Linux (x64/arm64), Windows (x64), archived as elizaos-<platform>.tar.gz / .zip. Download-and-run, no npm/Bun required.
  2. npm pack tarballs — the exact publishable .tgz for the headline packages (elizaos, @elizaos/core, @elizaos/agent, @elizaos/app-core) + SHA256SUMS-npm.txt. (--all packs all 156 public packages; default is curated to keep the release page readable.)
  3. Combined SHA256SUMS.txt across every attached artifact.

Key fix — compiled-aware asset resolution

A bun --compile binary serves its modules from the unreadable /$bunfs virtual root, so import.meta.url (and the CLI's getPackageRoot()) can't find templates/, templates-manifest.json, or package.json — the naive binary dies with ENOENT /$bunfs/package.json. package-info.ts now detects the compiled case (isStandaloneBinary()) and resolves those assets next to the real executable; build-standalone.ts stages 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.tsisStandaloneBinary() + compiled-aware getPackageRoot()
  • packages/elizaos/build-standalone.ts — cross-compile + stage + archive all targets
  • packages/scripts/pack-release-artifacts.mjs — emit real npm tarballs + checksums (headline / --all / --packages)
  • .github/workflows/release.yaml — stage artifacts + attach to beta and stable releases
  • packages/elizaos/src/package-info.test.ts — unit regression for asset resolution
  • packages/elizaos/scripts/standalone-smoke.mjs (test:standalone) — E2E: compile host binary, run version/info/create

Evidence (local)

Cross-compile all 5 targets from one host (18s):

▶ linux-x64     ✅ elizaos-linux-x64.tar.gz     (38.1 MB)
▶ linux-arm64   ✅ elizaos-linux-arm64.tar.gz   (37.8 MB)
▶ darwin-x64    ✅ elizaos-darwin-x64.tar.gz     (28.6 MB)
▶ darwin-arm64  ✅ elizaos-darwin-arm64.tar.gz   (26.1 MB)
▶ windows-x64   ✅ elizaos-windows-x64.zip       (40.5 MB)

Standalone binary E2E (bun run test:standalone) — extracts the archive and drives the real binary:

[standalone-smoke] elizaos version   → elizaOS CLI
[standalone-smoke] elizaos info      → elizaOS Templates (plugin, project)
[standalone-smoke] elizaos create    → rendered a 26-file plugin tree + .elizaos/template.json
[standalone-smoke] ✅ all checks passed

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: actionlint clean on release.yaml; bun run --cwd packages/elizaos typecheck clean; lint:check clean; package-info.test.ts 3/3 pass.

Evidence N/A

  • UI screenshots / video / frontend logs — N/A: CI/build tooling only, no packages/app/ surface.
  • Real-LLM trajectories — N/A: no agent/action/provider/prompt/model behavior changed.
  • Native/device capture — N/A: no native bridge touched.
  • Live release run — the workflow itself can only be exercised by cutting a real release; every step it calls is proven locally above. First beta after merge is the live confirmation.

🤖 Generated with Claude Code

…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>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2785b66-34af-4c9f-bdea-3abab907c52f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lalalune

lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

Closing as superseded by #11869, which carries the same validated change rebased onto current develop from an upstream branch.

@lalalune

lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

Superseded by upstream rebased PR #11869. I validated the same change on current origin/develop and opened #11869 because this PR head is from a fork and could not be updated directly from the canonical repo branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Releases only ship source code — attach downloadable binaries (standalone CLI + npm tarballs)

2 participants