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
22
33on :
44 pull_request :
5- types : [closed]
65 branches :
7- - master
6+ - feat-ce
87jobs :
98 upload :
10- if : github.event.pull_request.merged == true && github.repository == 'wechat-miniprogram/miniprogram-demo'
119 runs-on : ubuntu-latest
10+ environment : PR_CI
1211 steps :
1312 - uses : actions/checkout@v4
1413 with :
1514 fetch-depth : 0
1615 submodules : ' recursive'
1716 token : ${{ secrets.GITHUB_TOKEN }}
1817
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
2718
2819 - name : Upload MiniProgram
2920 env :
3021 WX_PRIVATE_KEY : ${{ secrets.WX_PRIVATE_KEY }}
3122 run : |
23+ # 验证密钥是否为空
24+ if [ -z "$WX_PRIVATE_KEY" ]; then
25+ echo "❌ 错误: WX_PRIVATE_KEY 为空,请检查 GitHub Secrets 设置"
26+ exit 1
27+ fi
3228 mkdir -p ./build
3329 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