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
|
- name: Set version from tag
|
||||||
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version
|
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)
|
- name: Make App (Linux)
|
||||||
run: npm run make -- --platform=linux --arch=x64
|
run: npm run make -- --platform=linux --arch=x64
|
||||||
|
|
||||||
@@ -40,10 +37,21 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
WINEDEBUG: '-all'
|
WINEDEBUG: '-all'
|
||||||
|
|
||||||
- name: Rebuild native modules for Windows
|
- name: Download Windows prebuilt native modules
|
||||||
run: npx --yes @electron/rebuild --platform=win32 --arch=x64 --only=better-sqlite3,keytar
|
shell: bash
|
||||||
env:
|
run: |
|
||||||
WINEDEBUG: '-all'
|
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)
|
- name: Make App (Windows)
|
||||||
run: npm run make -- --platform=win32 --arch=x64
|
run: npm run make -- --platform=win32 --arch=x64
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ import { FuseV1Options, FuseVersion } from '@electron/fuses';
|
|||||||
|
|
||||||
const config: ForgeConfig = {
|
const config: ForgeConfig = {
|
||||||
packagerConfig: {
|
packagerConfig: {
|
||||||
asar: true,
|
asar: {
|
||||||
|
unpack: '**/node_modules/{better-sqlite3,keytar}/**',
|
||||||
|
},
|
||||||
name: 'adiuva',
|
name: 'adiuva',
|
||||||
},
|
},
|
||||||
rebuildConfig: {},
|
rebuildConfig: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user