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
All checks were successful
Release Electron App / release-desktop (push) Successful in 6m27s
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -10,7 +10,9 @@ import { FuseV1Options, FuseVersion } from '@electron/fuses';
|
||||
|
||||
const config: ForgeConfig = {
|
||||
packagerConfig: {
|
||||
asar: true,
|
||||
asar: {
|
||||
unpack: '**/node_modules/{better-sqlite3,keytar}/**',
|
||||
},
|
||||
name: 'adiuva',
|
||||
},
|
||||
rebuildConfig: {},
|
||||
|
||||
Reference in New Issue
Block a user