openpencil/.github
Kayshen-X 5e6b7475a0 fix(ci): always source-build agent-native and bundle to napi/ root
The Zig NAPI provisioner had a silent failure mode that affected any
matrix entry without a matching ZSeven-W/agent prebuilt: the source-
build fallback dropped `agent_napi.node` at `zig-out/napi/...`, but
electron-builder only ships `packages/agent-native/napi/`. The addon
was therefore absent from the produced .exe / .dmg / .AppImage, and
every chat call died at the dynamic `@zseven-w/agent-native` import.

- Drop the prebuilt-download path; always build from source on the
  runner (mlugg/setup-zig is already provisioned for every workflow)
- Always copy the built binary into `napi/agent_napi.node` so
  electron-builder packages it
- Honor `ZIG_TARGET` to cross-compile (mac-x64 on arm64 runners now
  produces an x86_64 binary instead of a wrong-arch arm64 one)
- Add `OPENPENCIL_REQUIRE_AGENT_NATIVE=1` strict mode plus a
  dedicated "Verify agent-native binary" step in build-electron.yml
  so missing binaries fail the workflow loudly
- Add `OPENPENCIL_SKIP_AGENT_NATIVE=1` for publish-cli.yml, which
  never ships the addon and shouldn't pay for the build
2026-04-26 19:20:48 +08:00
..
ISSUE_TEMPLATE V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
workflows fix(ci): always source-build agent-native and bundle to napi/ root 2026-04-26 19:20:48 +08:00
FUNDING.yml V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
pull_request_template.md V0.3.3 (#33) 2026-03-11 21:18:49 +08:00