Skip to content

Commit 8c1df02

Browse files
committed
feat: Raspberry Pi用のビルドプロセスをarm64に最適化し、不要なステップを削除
1 parent 313d0d3 commit 8c1df02

1 file changed

Lines changed: 19 additions & 39 deletions

File tree

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,36 @@
1-
name: Publish Raspberry Pi
1+
name: Publish Raspberry Pi (arm64)
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
7-
workflow_dispatch:
88

99
jobs:
10-
publish:
11-
# To enable auto publishing to github, update your electron publisher
12-
# config in package.json > "build" and remove the conditional below
13-
# if: ${{ github.repository_owner == 'electron-react-boilerplate' }}
14-
15-
runs-on: ${{ matrix.os }}
16-
17-
strategy:
18-
matrix:
19-
os: [ubuntu-latest]
20-
10+
build-arm64:
11+
runs-on: ubuntu-latest
2112
steps:
22-
- name: Checkout git repo
13+
- name: Checkout repo
2314
uses: actions/checkout@v3
2415

25-
- name: Install Node and NPM
26-
uses: actions/setup-node@v3
27-
with:
28-
node-version: 18
29-
cache: npm
30-
31-
- name: Setup Python
32-
uses: actions/setup-python@v2
33-
with:
34-
python-version: '3.10'
35-
3616
- name: Set up QEMU
3717
uses: docker/setup-qemu-action@v3
3818
with:
39-
platforms: arm64,arm
40-
41-
- name: Install dependencies
42-
run: |
43-
sudo apt-get update
44-
sudo apt-get install -y --no-install-recommends libudev-dev
45-
46-
- name: Install and build
47-
run: |
48-
npm install
49-
npm run build
19+
platforms: arm64
5020

51-
- name: Publish releases
21+
- name: Build for arm64
5222
env:
53-
# This is used for uploading release assets to github
5423
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5524
run: |
56-
npm exec electron-builder -- --publish always --armv7l --arm64
25+
docker run --rm -t \
26+
--platform linux/arm64 \
27+
-v $PWD:/app \
28+
-w /app \
29+
node:18-bullseye \
30+
bash -c "
31+
npm install &&
32+
npm run postinstall &&
33+
npx electron-rebuild &&
34+
npm run build &&
35+
npx electron-builder --arm64 --publish always
36+
"

0 commit comments

Comments
 (0)