From caeccb15328319e3d63c3e11dcc9b985f1d6a54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=8F=9C=20Cai?= Date: Fri, 22 May 2026 15:33:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=20release=20dist?= =?UTF-8?q?=20zip=20=E5=9B=A0=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84=E9=94=99?= =?UTF-8?q?=E4=BD=8D=E6=9C=AA=E4=B8=8A=E4=BC=A0=E5=88=B0=20GitHub=20Releas?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用 $GITHUB_WORKSPACE 绝对路径输出 zip,避免相对层级算错(原 ../../ 实际只回退到 packages/) - 加 fail_on_unmatched_files: true 防止下次再静默丢资产 - 升级 softprops/action-gh-release v2 → v3 (Node 24 runtime) --- .github/workflows/reusable-npm-release.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-npm-release.yml b/.github/workflows/reusable-npm-release.yml index b1fa45353..180427d66 100644 --- a/.github/workflows/reusable-npm-release.yml +++ b/.github/workflows/reusable-npm-release.yml @@ -45,15 +45,13 @@ jobs: # ========================================================================= - name: Package dist to zip if: inputs.core_version != '' - working-directory: ./packages/cherry-markdown - run: | - cd dist - zip -r ../../cherry-markdown-${{ inputs.core_version }}.zip . - cd ../.. + working-directory: ./packages/cherry-markdown/dist + run: zip -r "$GITHUB_WORKSPACE/cherry-markdown-${{ inputs.core_version }}.zip" . - name: Upload dist zip to GitHub Release if: inputs.core_version != '' - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: files: cherry-markdown-${{ inputs.core_version }}.zip tag_name: 'cherry-markdown@${{ inputs.core_version }}' + fail_on_unmatched_files: true