From 81e6ed5e60e2b53bd57083a5af6532adecab5c4c Mon Sep 17 00:00:00 2001 From: wzy Date: Thu, 15 May 2025 10:53:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20wzy=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01376cff..e13b5409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,11 @@ name: WeChat MiniProgram Demo CI/CD on: - pull_request: - types: [closed] + push: branches: - - master + - feat-ce jobs: upload: - if: github.event.pull_request.merged == true && github.repository == 'wechat-miniprogram/miniprogram-demo' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -29,7 +27,11 @@ jobs: env: WX_PRIVATE_KEY: ${{ secrets.WX_PRIVATE_KEY }} run: | + # 验证密钥是否为空 + if [ -z "$WX_PRIVATE_KEY" ]; then + echo "❌ 错误: WX_PRIVATE_KEY 为空,请检查 GitHub Secrets 设置" + exit 1 + fi mkdir -p ./build echo "$WX_PRIVATE_KEY" > ./build/key - chmod +x ./build/ci.js - node ./build/ci.js --skip-key-write + echo "$WX_PRIVATE_KEY" | xxd \ No newline at end of file From d539250f24404a1a3db12d26961af58dd927301f Mon Sep 17 00:00:00 2001 From: wzy Date: Thu, 15 May 2025 10:57:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20wzy=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e13b5409..e13d5f71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,9 @@ name: WeChat MiniProgram Demo CI/CD on: - push: + pull_request: branches: - - feat-ce + - master jobs: upload: runs-on: ubuntu-latest