fix(electron): release desktop app workflow (#4594)

This commit is contained in:
LongYinan
2023-10-17 14:15:55 +08:00
committed by GitHub
parent 01987990ee
commit e831f612e8
14 changed files with 96 additions and 39 deletions

View File

@@ -130,15 +130,17 @@ module.exports = {
packageJson.productName = productName;
},
prePackage: async () => {
await rm(path.join(__dirname, 'node_modules'), {
recursive: true,
force: true,
});
if (!process.env.HOIST_NODE_MODULES) {
await rm(path.join(__dirname, 'node_modules'), {
recursive: true,
force: true,
});
await symlink(
path.join(__dirname, '..', '..', 'node_modules'),
path.join(__dirname, 'node_modules')
);
await symlink(
path.join(__dirname, '..', '..', 'node_modules'),
path.join(__dirname, 'node_modules')
);
}
},
generateAssets: async (_, platform, arch) => {
if (process.env.SKIP_GENERATE_ASSETS) {

View File

@@ -52,7 +52,7 @@
"@types/uuid": "^9.0.5",
"builder-util-runtime": "^9.2.1",
"cross-env": "7.0.3",
"electron": "^26.4.0",
"electron": "^27.0.0",
"electron-log": "^5.0.0-rc.1",
"electron-squirrel-startup": "1.0.0",
"electron-window-state": "^5.0.3",

View File

@@ -41,9 +41,12 @@ $.env.DISTRIBUTION = 'desktop';
cd(repoRootDir);
if (!process.env.SKIP_PLUGIN_BUILD) {
await $`yarn -T run build:plugins`;
}
// step 1: build web (nextjs) dist
if (!process.env.SKIP_WEB_BUILD) {
await $`yarn -T run build:plugins`;
await $`yarn nx build @affine/core`;
await $`yarn workspace @affine/electron build`;