From cc6d414d10920f143051c6fc226552c7e08a6dbe Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Sat, 23 May 2026 14:43:36 +0800 Subject: [PATCH] fix(ci): fix release workflow artifact upload - Copy zip files to fixed directory before upload to avoid glob pattern issues - Add debug steps to verify output and downloaded artifacts - Fix Node.js 20 compatibility issue with upload-artifact@v4 --- .github/workflows/release.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c35b227..c8d09c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,23 +96,28 @@ jobs: npm run zip npm run zip:firefox - # 🔍 关键调试步骤:确认 zip 文件位置 + # 🔍 调试:确认 zip 文件位置 - name: Verify output files run: | - echo "=== .output/ ===" - ls -la .output/ 2>/dev/null || echo "Not found" + echo "=== .output/ contents ===" + ls -la .output/ || echo "Not found" echo "=== All zip files ===" - find . -name "*.zip" -type f 2>/dev/null || echo "No zip files" + find . -name "*.zip" -type f + + # 💡 关键修复:将 zip 文件复制到固定目录,避免 glob 问题 + - name: Prepare release artifacts + run: | + mkdir -p release-archives + cp .output/*.zip release-archives/ 2>/dev/null || true + echo "Files in release-archives:" + ls -la release-archives/ - name: Upload Extension Artifacts uses: actions/upload-artifact@v4 with: name: extension-zips - path: | - .output/*.zip - dist/*.zip - *.zip - if-no-files-found: error # ← 如果没有文件,直接报错 + path: release-archives/ + if-no-files-found: error retention-days: 7 # ── Phase 4: 发布 ───────────────────────