Skip to content

feat: add github workflows for publishing napi bindings#674

Merged
morgante merged 1 commit intobiomejs:mainfrom
cogwirrel:feat/napi-publish-workflow
Mar 22, 2026
Merged

feat: add github workflows for publishing napi bindings#674
morgante merged 1 commit intobiomejs:mainfrom
cogwirrel:feat/napi-publish-workflow

Conversation

@cogwirrel
Copy link
Copy Markdown
Contributor

For #214 now that #617 is merged, this adds a workflow for publishing @getgrit/gritql and all the platform specific bindings.

NB I haven't tried this out, it's Claude's handiwork based on the scaffolded CI.yml file in js/gritql, but I hope it's at least a start :)

@cogwirrel cogwirrel force-pushed the feat/napi-publish-workflow branch from 5885e2f to c4a0009 Compare March 16, 2026 04:24
Add a comprehensive CI/CD workflow (napi.yaml) for building, testing,
and publishing native Node.js bindings via napi-rs across multiple
platforms.

Supported build targets:
- x86_64-apple-darwin & aarch64-apple-darwin (+ universal binary)
- x86_64-pc-windows-msvc & aarch64-pc-windows-msvc
- x86_64-unknown-linux-gnu (Debian docker)
- x86_64-unknown-linux-musl (Alpine docker, g++ for C++ stdlib headers)
- aarch64-unknown-linux-gnu (Debian docker, cross-compiled with
  aarch64-linux-gnu-gcc/g++ and -mno-outline-atomics for QEMU compat)
- aarch64-unknown-linux-musl (Alpine docker, cross-compiled with
  aarch64-linux-musl-gcc/g++ toolchain)
- aarch64-linux-android
- riscv64gc-unknown-linux-gnu (with g++-riscv64-linux-gnu)
- FreeBSD x64 (via cross-platform-actions v0.25.0 on ubuntu-latest)

Removed targets not supported by wasmtime/cranelift:
- i686-pc-windows-msvc (32-bit x86)
- armv7-linux-androideabi (32-bit ARM Android)
- armv7-unknown-linux-gnueabihf (32-bit ARM Linux)
- armv7-unknown-linux-musleabihf (32-bit ARM Linux musl)

Test matrix:
- Linux x64 gnu: node@18, node@20 with bun
- Linux x64 musl: node@18, node@20 via oven/bun:alpine docker
- Linux aarch64 gnu: node@18, node@20 via QEMU + node:bookworm
- Linux aarch64 musl: via QEMU + oven/bun:alpine
- macOS: universal binary on node@18, node@20
- Windows x64: node@18, node@20

Publishing:
- Auto-publishes to npm on main branch when version changes
- Supports manual publish via workflow_dispatch
@cogwirrel cogwirrel force-pushed the feat/napi-publish-workflow branch from bb80bd7 to eed50c0 Compare March 22, 2026 02:26
@morgante morgante merged commit f926561 into biomejs:main Mar 22, 2026
24 of 29 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.

2 participants