fix: cleanup electron build script (#1813)

This commit is contained in:
Peng Xiao authored and GitHub committed 2023-04-04 07:40:07 -05:00
1 parent c023d0a2b8
commit 5bd3aa4a80
5 files changed
+64 -150

No files matched your search

+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`;
},
},
};