Skip to content

Commit 25689f1

Browse files
committed
fix: use Move-Item instead of Rename-Item for cross-directory rename
1 parent 92280dd commit 25689f1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ jobs:
8383
# 创建 .icpx (先 .zip 再重命名)
8484
$outDir = "SamplePlugin/packages"
8585
New-Item -ItemType Directory -Path $outDir -Force | Out-Null
86-
$zipPath = Join-Path $outDir "$pluginId.zip"
87-
$icpxPath = Join-Path $outDir "$pluginId.icpx"
86+
$zipPath = "$outDir/$pluginId.zip"
87+
$icpxName = "$pluginId.icpx"
8888
Compress-Archive -Path "$tempDir/*" -DestinationPath $zipPath -Force
89+
# Rename-Item 不支持跨目录重命名,用 Move-Item 替代
90+
$icpxPath = "$outDir/$icpxName"
8991
if (Test-Path $icpxPath) { Remove-Item $icpxPath }
90-
Rename-Item $zipPath $icpxPath
92+
Move-Item $zipPath $icpxPath -Force
9193
9294
# 计算 SHA256
9395
$hash = (Get-FileHash $icpxPath -Algorithm SHA256).Hash.ToLower()

0 commit comments

Comments
 (0)