fix: cleanup electron build script (#1813)

This commit is contained in:
Peng Xiao
2023-04-04 20:40:07 +08:00
committed by GitHub
parent c023d0a2b8
commit 5bd3aa4a80
5 changed files with 64 additions and 150 deletions
+14
View File
@@ -31,4 +31,18 @@ module.exports = {
},
},
],
hooks: {
generateAssets: async (_, platform, arch) => {
const { $ } = await import('zx');
if (platform === 'darwin' && arch === 'arm64') {
// In GitHub Actions runner, MacOS is always x64
// we need to manually set TARGET to aarch64-apple-darwin
process.env.TARGET = 'aarch64-apple-darwin';
}
// run yarn generate-assets
await $`yarn generate-assets`;
},
},
};