fix: CI release 步骤处理含空格的文件名
Windows 安装包文件名 "CodePilot Setup x.x.x.exe" 含空格,
$FILES 变量展开时被 bash word splitting 拆成多个参数导致
gh release create 找不到文件。改用 bash 数组 + "${FILES[@]}"
安全展开。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
38e7c96daa
commit
5dda2ea1e3
1 file changed
+6
-4
@@ -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[@]}"
|
||||
Reference in new issue
Block a user