diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b722b39..84602f3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: diff --git a/scripts/afterPack.js b/scripts/afterPack.js index c1fcc505..3f59d71c 100644 --- a/scripts/afterPack.js +++ b/scripts/afterPack.js @@ -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 }); @@ -46,14 +47,14 @@ exports.default = async (buildPath, electronVersion, platform, arch, callback) = // await exec(`npm i --legacy-building`, { cwd: path.join(cwd, 'node_modules', 'app-path', 'node_modules', 'get-stream') }); 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') }); + // 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'), 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(); diff --git a/template/wiki b/template/wiki index 2274aa4e..4c28c12f 160000 --- a/template/wiki +++ b/template/wiki @@ -1 +1 @@ -Subproject commit 2274aa4e9af025ee45fda5989f66c4a19125d5ab +Subproject commit 4c28c12fb47f506efaea6665c5f9e8bfc7b6d023