refactor: update native module handling for Windows and Linux in build process
All checks were successful
Release Electron App / release-desktop (push) Successful in 6m27s

This commit is contained in:
2026-03-03 17:21:00 +01:00
parent cded75eb0f
commit 603d8f0e7e
2 changed files with 18 additions and 8 deletions

View File

@@ -26,9 +26,6 @@ jobs:
- name: Set version from tag
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version
- name: Rebuild native modules for Linux
run: npx --yes @electron/rebuild --platform=linux --arch=x64
- name: Make App (Linux)
run: npm run make -- --platform=linux --arch=x64
@@ -40,10 +37,21 @@ jobs:
env:
WINEDEBUG: '-all'
- name: Rebuild native modules for Windows
run: npx --yes @electron/rebuild --platform=win32 --arch=x64 --only=better-sqlite3,keytar
env:
WINEDEBUG: '-all'
- name: Download Windows prebuilt native modules
shell: bash
run: |
ELECTRON_VERSION=$(node -e "console.log(require('electron/package.json').version)")
echo "Downloading prebuilt native modules for Electron ${ELECTRON_VERSION} (win32/x64)..."
# better-sqlite3
cd node_modules/better-sqlite3
npx --yes prebuild-install -r electron -t ${ELECTRON_VERSION} --platform win32 --arch x64 --verbose
cd ../..
# keytar
cd node_modules/keytar
npx --yes prebuild-install -r electron -t ${ELECTRON_VERSION} --platform win32 --arch x64 --verbose || echo "keytar prebuilt not available, skipping"
cd ../..
- name: Make App (Windows)
run: npm run make -- --platform=win32 --arch=x64