Skip to content

Commit 520f15b

Browse files
committed
More efforts for the x86 build
1 parent d88dc3c commit 520f15b

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

.github/workflows/package.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
- uses: actions/setup-node@v4
6666
with:
6767
node-version: ${{ matrix.node }}
68-
architecture: ${{ matrix.host }}
68+
architecture: ${{ matrix.target }}
6969

7070
- name: Install dependencies
7171
run: yarn install --network-timeout 300000
@@ -86,6 +86,7 @@ jobs:
8686
# github endpoints hang up quite a bit, add one retry.
8787
run: yarn run electron:ci || yarn run electron:ci
8888
env:
89+
TARGET_ARCH: ${{ matrix.target }}
8990
GITHUB_TOKEN: ${{ github.token }}
9091
DEBUG: electron-builder
9192
APPLE_ID: ${{ secrets.APPLE_ID }}
@@ -96,6 +97,6 @@ jobs:
9697

9798
- uses: actions/upload-artifact@v4
9899
with:
99-
name: ${{ matrix.os }}-${{ matrix.host }}
100+
name: ${{ matrix.os }}-${{ matrix.host }}-${{ matrix.target }}
100101
path: dist/grist-electron-*
101102
if-no-files-found: "error"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"electron:preview": "electron core/_build/ext/app/electron/main.js",
2424
"electron:dir": "electron-builder build --linux --dir",
2525
"electron:linux": "electron-builder build --linux",
26-
"electron:ci": "electron-builder build --publish always",
26+
"electron:ci": "./scripts/ci.sh",
2727
"electron": "electron-builder build --publish never",
2828
"test": "cd core && rm -f junk.db && node _build/app/server/companion.js sqlite gristify junk.db && ls junk.db"
2929
},

scripts/ci.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
case $TARGET_ARCH in
6+
"x86")
7+
ARCHFLAG="--ia32"
8+
;;
9+
"x64")
10+
ARCHFLAG="--x64"
11+
;;
12+
"arm64")
13+
ARCHFLAG="--arm64"
14+
*)
15+
echo "Target architecture $TARGET_ARCH not supported"
16+
exit 1
17+
;;
18+
esac
19+
20+
electron-builder build $ARCHFLAG --publish always

0 commit comments

Comments
 (0)