fix(electron): packaging on windows (#12443)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Added Windows support to the desktop bundle check in CI workflows, ensuring Windows builds are tested and packaged alongside existing platforms. - Refined the cleanup process during Windows packaging to more precisely remove specific nested dependencies, improving build reliability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
19
.github/workflows/build-test.yml
vendored
19
.github/workflows/build-test.yml
vendored
@@ -1355,6 +1355,13 @@ jobs:
|
|||||||
target: x86_64-unknown-linux-gnu,
|
target: x86_64-unknown-linux-gnu,
|
||||||
test: true,
|
test: true,
|
||||||
}
|
}
|
||||||
|
- {
|
||||||
|
os: windows-latest,
|
||||||
|
platform: windows,
|
||||||
|
arch: x64,
|
||||||
|
target: x86_64-pc-windows-msvc,
|
||||||
|
test: true,
|
||||||
|
}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
@@ -1395,6 +1402,18 @@ jobs:
|
|||||||
HOIST_NODE_MODULES: 1
|
HOIST_NODE_MODULES: 1
|
||||||
run: yarn affine @affine/electron package --platform=darwin --arch=arm64
|
run: yarn affine @affine/electron package --platform=darwin --arch=arm64
|
||||||
|
|
||||||
|
- name: Make Bundle (Windows)
|
||||||
|
if: ${{ matrix.spec.target == 'x86_64-pc-windows-msvc' }}
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SKIP_BUNDLE: true
|
||||||
|
SKIP_WEB_BUILD: true
|
||||||
|
HOIST_NODE_MODULES: 1
|
||||||
|
run: |
|
||||||
|
rm -rf packages/frontend/apps/electron/node_modules/@affine/nbstore/node_modules/@blocksuite/affine/node_modules
|
||||||
|
rm -rf packages/frontend/apps/electron/node_modules/@affine/native/node_modules
|
||||||
|
yarn affine @affine/electron package --platform=win32 --arch=x64
|
||||||
|
|
||||||
- name: Make Bundle (Linux)
|
- name: Make Bundle (Linux)
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository universe
|
sudo add-apt-repository universe
|
||||||
|
|||||||
2
.github/workflows/release-desktop.yml
vendored
2
.github/workflows/release-desktop.yml
vendored
@@ -252,7 +252,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
# node_modules of nbstore is not needed for building, and it will make the build process out of memory
|
# node_modules of nbstore is not needed for building, and it will make the build process out of memory
|
||||||
run: |
|
run: |
|
||||||
rm -rf packages/frontend/apps/electron/node_modules/@affine/nbstore/node_modules/@blocksuite
|
rm -rf packages/frontend/apps/electron/node_modules/@affine/nbstore/node_modules/@blocksuite/affine/node_modules
|
||||||
rm -rf packages/frontend/apps/electron/node_modules/@affine/native/node_modules
|
rm -rf packages/frontend/apps/electron/node_modules/@affine/native/node_modules
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
|
|||||||
Reference in New Issue
Block a user