This commit is contained in:
lin onetwo 2023-05-20 01:08:40 +08:00
parent aacc486dfb
commit e38a08fa82
3 changed files with 10 additions and 6 deletions

View file

@ -57,6 +57,9 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Make Linux (x64)
run: npm run make:linux-x64
env:

View file

@ -26,6 +26,7 @@ exports.default = async (buildPath, electronVersion, platform, arch, callback) =
const projectRoot = path.resolve(__dirname, '..');
const appParentPath = path.resolve(buildPath, '..', '..', '..', '..');
const appPath = path.join(appParentPath, 'Electron.app');
const shell = platform === 'darwin' ? '/bin/zsh' : undefined;
/** delete useless lproj files to make it clean */
const lproj = glob.sync('*.lproj', { cwd });
@ -47,13 +48,13 @@ exports.default = async (buildPath, electronVersion, platform, arch, callback) =
await fs.copy(path.join(projectRoot, 'node_modules', 'zx'), path.join(cwd, 'node_modules', 'zx'));
// not using pnpm, because after using it, it always causing problem here, causing `Error: spawn /bin/sh ENOENT` in github actions
// it can probably being "working directory didn't exist" in https://github.com/nodejs/node/issues/9644#issuecomment-282060923
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx') });
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'globby') });
await exec(`npm i --legacy-building --ignore-scripts`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'node-fetch') });
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx'), shell });
await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'globby'), shell });
await exec(`npm i --legacy-building --ignore-scripts`, { cwd: path.join(cwd, 'node_modules', 'zx', 'node_modules', 'node-fetch'), shell });
}
/** sign it for mac m1 https://www.zhihu.com/question/431722091/answer/1592339574 */
if (platform === 'darwin') {
await exec(`xattr -rd com.apple.quarantine ${appPath}`, { cwd: appParentPath });
await exec(`xattr -rd com.apple.quarantine ${appPath}`, { cwd: appParentPath, shell });
}
/** complete this hook */
callback();

@ -1 +1 @@
Subproject commit 2274aa4e9af025ee45fda5989f66c4a19125d5ab
Subproject commit 4c28c12fb47f506efaea6665c5f9e8bfc7b6d023