Skip to content

Commit 8c6dff1

Browse files
committed
Simplify Windows build ZIP packaging step
The workflow now creates the ZIP archive directly from the dist\WebShare directory contents, removing the need to rename the folder before compression. This streamlines the packaging process and reduces unnecessary file operations.
1 parent 93048a6 commit 8c6dff1

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

.github/workflows/build-windows.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,9 @@ jobs:
180180
Write-Host "Files in dist directory:"
181181
Get-ChildItem -Path "dist\WebShare" -Recurse | ForEach-Object { Write-Host " $($_.FullName)" }
182182
183-
# Rename dist folder to WebShare-v{version}
184-
$folderName = "WebShare-v$version"
185-
if (Test-Path $folderName) { Remove-Item $folderName -Recurse -Force }
186-
Rename-Item "dist\WebShare" $folderName
187-
188-
# Create ZIP from the renamed folder
189-
$zipName = "$folderName-Windows-portable.zip"
190-
Compress-Archive -Path "$folderName\*" -DestinationPath "artifacts\$zipName" -CompressionLevel Optimal
183+
# Create ZIP directly from dist\WebShare contents
184+
$zipName = "WebShare-v$version-Windows-portable.zip"
185+
Compress-Archive -Path "dist\WebShare\*" -DestinationPath "artifacts\$zipName" -CompressionLevel Optimal
191186
Write-Host "Created: artifacts\$zipName"
192187
193188
# Show file size

0 commit comments

Comments
 (0)