fix(build): use sharp prebuilt instead of compiling from source (fixes macOS CI)

This commit is contained in:
Siddharth
2026-06-04 22:58:48 -07:00
parent c03db08448
commit c6331badb1
2 changed files with 13 additions and 1 deletions
+9
View File
@@ -69,6 +69,15 @@ jobs:
- name: Install dependencies
run: npm ci
# ─── Ensure sharp prebuilt binary (+ bundled libvips) ─────
# `npm ci` can leave sharp without its prebuilt binary/vendored libvips,
# which makes electron-builder's native rebuild fail ("vips-cpp.42 not
# found"). Re-fetch the prebuilt (never compile from source).
- name: Ensure sharp prebuilt
run: npm rebuild sharp
env:
npm_config_build_from_source: "false"
# ─── Import Code Signing Certificate ──────────────────────
# This is the KEY step that makes CI signing work.
# We create a temporary keychain, import the .p12 cert into it,
+4 -1
View File
@@ -9,7 +9,10 @@
],
"productName": "Openscreen",
"npmRebuild": true,
"buildDependenciesFromSource": true,
// sharp ships ABI-stable (napi) prebuilt binaries with bundled libvips. Building it from source
// needs a system libvips we don't provide and breaks on CI/local ("vips-cpp.42 not found"), so we
// let electron-builder use the prebuilt instead of recompiling.
"buildDependenciesFromSource": false,
"compression": "normal",
"directories": {
"output": "release/${version}"