AFFiNE/.github/workflows
Peng Xiao 3839a9bd15
build(electron): asar (#4965)
Due to restrictions on how Electron package works, the `node_modules` should not be hoisted and not to use s/h-links at all. This is why we need to have two separate installs for electron and non-electron packages in the build.

Tested via the following script

```bash
#!/bin/bash

echo "step 1: clean up"
find . -name "node_modules" -prune -exec rm -rf '{}' +
# git clean -dfX
build_type=canary

echo "step 2: install web dependencies"
# firstly, build web static
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 SENTRYCLI_SKIP_DOWNLOAD=1 PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=1 yarn

echo "step 3: generate assets"
BUILD_TYPE="$build_type" yarn workspace @affine/electron generate-assets

# cleanup node_modules
find . -name "node_modules" -prune -exec rm -rf '{}' +

echo "step 4: install electron dependencies"
# install electron deps
yarn config set nmHoistingLimits workspaces
yarn config set enableScripts false
yarn config set nmMode classic
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 HUSKY=0 yarn workspaces focus @affine/electron @affine/monorepo

echo "step 5: build native"
# build native
yarn workspace @affine/native build
yarn workspace @affine/storage build

echo "step 6: build electron"
# build electron
yarn workspace @affine/electron build

echo "step 7: package electron"
# package
SKIP_GENERATE_ASSETS=1 BUILD_TYPE="$build_type" HOIST_NODE_MODULES=1 yarn workspace @affine/electron package
```
2023-11-21 17:44:30 +00:00
..
auto-labeler.yml ci: add labeler.yml 2023-04-05 20:14:11 -05:00
build-desktop.yml build(electron): asar (#4965) 2023-11-21 17:44:30 +00:00
build-server.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
build.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
cache-cleanup.yml ci: speedup ci by reduce installation packages in certain job (#4457) 2023-09-29 03:02:26 +00:00
cancel.yml ci: bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0 (#4686) 2023-10-23 07:39:51 +00:00
codeql.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
deploy.yml ci: dynamic setup server deploy environment by release tag (#4790) 2023-11-01 07:38:15 +00:00
dispatch-deploy.yml ci: dynamic setup server deploy environment by release tag (#4790) 2023-11-01 07:38:15 +00:00
helm-releaser.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
label-checker.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
languages-sync.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
nightly-build.yml ci: only disable postinstall on macOS in nightly desktop build (#4938) 2023-11-14 23:03:49 +08:00
pr-auto-assign.yml ci: bump kentaro-m/auto-assign-action from 1.2.4 to 1.2.5 (#4687) 2023-10-23 07:22:02 +00:00
pr-title-lint.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
publish-storybook.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
release-desktop-app.yml ci: disable postinstall on macOS build (#4885) 2023-11-09 11:58:55 +00:00
release.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00
windows-signer.yml build: sign windows app (#3809) 2023-08-22 10:16:26 -05:00
workers.yml chore: change default branch to canary (#4948) 2023-11-15 07:46:50 +00:00