Skip to content

feat: ship native binaries via GitHub Releases#4

Merged
rubnogueira merged 3 commits into
masterfrom
binaries
May 19, 2026
Merged

feat: ship native binaries via GitHub Releases#4
rubnogueira merged 3 commits into
masterfrom
binaries

Conversation

@rubnogueira
Copy link
Copy Markdown

Replace the source-compile-on-install flow (which lost binaries through pnpm's side-effects cache) with the prebuild + prebuild-install pattern.

  • GitHub Actions matrix builds prebuilt .tar.gz per (platform, arch, libc, ABI) for Node 24.15.0 and 26.1.0 across darwin (x64, arm64), linux (x64, arm64 each with glibc + musl) and win32 (x64)
  • On a tagged push, the workflow attaches every variant to a GitHub Release via softprops/action-gh-release@v2
  • Consumers install with "node-expat": "github:PruvoNet/node-expat#v2.4.2"; prebuild-install reads binary.host/remote_path from package.json and downloads the matching asset at install time, falling back to node-gyp rebuild only if no matching prebuild exists
  • Drop the custom scripts/install.js (prebuild-install supersedes it)

rubnogueira and others added 3 commits May 19, 2026 18:10
Replace the source-compile-on-install flow (which lost binaries through
pnpm's side-effects cache) with the prebuild + prebuild-install pattern.

- GitHub Actions matrix builds prebuilt .tar.gz per (platform, arch, libc, ABI)
  for Node 24.15.0 and 26.1.0 across darwin (x64, arm64), linux (x64, arm64
  each with glibc + musl) and win32 (x64)
- On a tagged push, the workflow attaches every variant to a GitHub Release
  via softprops/action-gh-release@v2
- Consumers install with "node-expat": "github:PruvoNet/node-expat#v2.4.2";
  prebuild-install reads binary.host/remote_path from package.json and
  downloads the matching asset at install time, falling back to node-gyp
  rebuild only if no matching prebuild exists
- Drop the custom scripts/install.js (prebuild-install supersedes it)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add a `gate-release` job that runs after the matrix and only allows
  the `release` job to proceed if the tag commit is reachable from
  origin/master. Tags pushed from feature branches still run the build
  matrix (for verification) but the release is skipped, not failed.
- Replace the `container: node:24-alpine` directive on musl jobs with
  an explicit `docker run` invocation. GitHub Actions JS actions can't
  run inside Alpine containers on ARM64 runners; running the build
  inside `docker run` on the host runner sidesteps that limitation and
  keeps the x64/arm64 musl paths identical.
- Drop the obsolete `build-release` branch from the push trigger.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nan 2.25 still calls SetAlignedPointerInInternalField /
GetAlignedPointerFromInternalField with the old (index, value)
signature. V8 in Node 26 made the EmbedderDataTypeTag argument
mandatory, so the addon failed to compile against Node 26 headers
with "too few arguments to function call, expected 3, have 2".

nan 2.27 ships the updated shims. Verified locally that both
24.15.0 and 26.1.0 prebuilds now build cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rubnogueira rubnogueira merged commit 13974e9 into master May 19, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant