From 5dda2ea1e3e63809c95622aa0b4304bbc6cf4de5 Mon Sep 17 00:00:00 2001 From: 7418 <7418@openclaw.ai> Date: Mon, 2 Mar 2026 14:55:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20release=20=E6=AD=A5=E9=AA=A4?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=90=AB=E7=A9=BA=E6=A0=BC=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows 安装包文件名 "CodePilot Setup x.x.x.exe" 含空格, $FILES 变量展开时被 bash word splitting 拆成多个参数导致 gh release create 找不到文件。改用 bash 数组 + "${FILES[@]}" 安全展开。 Co-Authored-By: Claude Opus 4.6 --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 095f258..bfdbe1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -211,13 +211,15 @@ jobs: CHANGELOG_INLINE_EOF fi - # Collect all release files - FILES=$(find artifacts -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" -o -name "*.blockmap" -o -name "*.yml" \) | sort) + # Collect all release files (handle filenames with spaces) + FILES=() + while IFS= read -r f; do + FILES+=("$f") + done < <(find artifacts -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.rpm" -o -name "*.blockmap" -o -name "*.yml" \) | sort) # Create release and upload all assets in one shot - # shellcheck disable=SC2086 gh release create "${GITHUB_REF_NAME}" \ --title "CodePilot v${VERSION}" \ --notes-file release-notes.md \ --latest \ - $FILES + "${FILES[@]}"