Skip to content

Commit 5dda2ea

Browse files
7418claude
andcommitted
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>
1 parent 38e7c96 commit 5dda2ea

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,15 @@ jobs:
211211
CHANGELOG_INLINE_EOF
212212
fi
213213
214-
# Collect all release files
215-
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)
214+
# Collect all release files (handle filenames with spaces)
215+
FILES=()
216+
while IFS= read -r f; do
217+
FILES+=("$f")
218+
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)
216219
217220
# Create release and upload all assets in one shot
218-
# shellcheck disable=SC2086
219221
gh release create "${GITHUB_REF_NAME}" \
220222
--title "CodePilot v${VERSION}" \
221223
--notes-file release-notes.md \
222224
--latest \
223-
$FILES
225+
"${FILES[@]}"

0 commit comments

Comments
 (0)