File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -2,34 +2,29 @@ name: WeChat MiniProgram Demo CI/CD
2
2
3
3
on :
4
4
pull_request :
5
- types : [closed]
6
5
branches :
7
- - master
6
+ - feat-ce
8
7
jobs :
9
8
upload :
10
- if : github.event.pull_request.merged == true && github.repository == 'wechat-miniprogram/miniprogram-demo'
11
9
runs-on : ubuntu-latest
10
+ environment : PR_CI
12
11
steps :
13
12
- uses : actions/checkout@v4
14
13
with :
15
14
fetch-depth : 0
16
15
submodules : ' recursive'
17
16
token : ${{ secrets.GITHUB_TOKEN }}
18
17
19
- - name : Clone submodule
20
- run : git submodule status
21
-
22
- - name : Install dependencies
23
- run : npm install
24
-
25
- - name : Run package script
26
- run : npm run init
27
18
28
19
- name : Upload MiniProgram
29
20
env :
30
21
WX_PRIVATE_KEY : ${{ secrets.WX_PRIVATE_KEY }}
31
22
run : |
23
+ # 验证密钥是否为空
24
+ if [ -z "$WX_PRIVATE_KEY" ]; then
25
+ echo "❌ 错误: WX_PRIVATE_KEY 为空,请检查 GitHub Secrets 设置"
26
+ exit 1
27
+ fi
32
28
mkdir -p ./build
33
29
echo "$WX_PRIVATE_KEY" > ./build/key
34
- chmod +x ./build/ci.js
35
- node ./build/ci.js --skip-key-write
30
+ echo "$WX_PRIVATE_KEY" | xxd
You can’t perform that action at this time.
0 commit comments