Skip to content

Commit 1e842e6

Browse files
committed
chore(ci): 更新 GitHub Actions 工作流,支持多平台 Electron 构建
1 parent 2527693 commit 1e842e6

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/package.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Electron App
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest, windows-latest, macos-latest]
13+
runs-on: ${{ matrix.os }}
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
cache: "npm"
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Build project
29+
run: npm run build
30+
31+
- name: Upload build artifacts
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: ${{ matrix.os }}-build
35+
path: |
36+
dist_electron/

0 commit comments

Comments
 (0)