Skip to content

Commit a2a76ba

Browse files
committed
chore(ci): 安装 cnpm 依赖解决找不到锁的问题
1 parent 1d06d2a commit a2a76ba

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/package.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Build Electron App
33
on:
44
push:
55
branches:
6-
- main
6+
- main # 每次 push 到 main 分支触发
77

88
jobs:
99
build:
1010
strategy:
1111
matrix:
12-
os: [ubuntu-latest, windows-latest, macos-latest]
12+
os: [ubuntu-latest, windows-latest, macos-latest]
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:
@@ -22,15 +22,17 @@ jobs:
2222
node-version: 18
2323
cache: "npm"
2424

25-
- name: Install dependencies
26-
run: cnpm install
25+
- name: Install cnpm and dependencies
26+
run: |
27+
npm install -g cnpm # 安装 cnpm
28+
cnpm install # 使用 cnpm 安装依赖
2729
2830
- name: Build project
29-
run: npm run build
31+
run: npm run build
3032

3133
- name: Upload build artifacts
3234
uses: actions/upload-artifact@v4
3335
with:
3436
name: ${{ matrix.os }}-build
3537
path: |
36-
dist_electron/
38+
dist_electron/ # 上传构建输出的文件

0 commit comments

Comments
 (0)