Skip to content

Commit cbcfc08

Browse files
committed
fix: 增强 VSIX 文件验证逻辑
- 针对不同操作系统(Linux/macOS 和 Windows)分别添加 VSIX 文件验证步骤 - 优化输出信息,提供更清晰的文件创建状态反馈
1 parent e3a835d commit cbcfc08

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/pr-check.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,32 @@ jobs:
156156
- name: Package extension
157157
run: pnpm run package:vsix
158158

159-
- name: Verify VSIX
159+
- name: Verify VSIX on Linux/macOS
160+
if: runner.os != 'Windows'
161+
shell: bash
160162
run: |
161-
# 检查VSIX文件是否存在
162163
set -e
163164
VSIX_FILE=$(ls *.vsix 2>/dev/null || true)
164165
if [ -z "$VSIX_FILE" ]; then
165166
echo "❌ VSIX file not found"
166167
exit 1
167168
fi
168-
169-
# 列出VSIX文件
169+
170+
echo "✅ VSIX file created: $VSIX_FILE"
170171
ls -lh $VSIX_FILE
171-
echo "✅ VSIX file created successfully"
172+
173+
- name: Verify VSIX on Windows
174+
if: runner.os == 'Windows'
175+
shell: pwsh
176+
run: |
177+
$vsix = Get-ChildItem -Filter *.vsix
178+
if (-not $vsix) {
179+
Write-Error "❌ VSIX file not found"
180+
exit 1
181+
}
182+
Write-Host "✅ VSIX file created: $($vsix.Name)"
183+
Get-ChildItem *.vsix | Format-List
184+
172185
173186
- name: Upload build artifacts
174187
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)