Enhance Windows packaging process in release workflow

- Updated the Windows packaging step in release.yml to use PowerShell's Compress-Archive for creating zip files, improving compatibility and reliability.
- Added informative echo statements to clarify the packaging process for Windows builds.
This commit is contained in:
scawful
2025-09-28 11:11:15 -04:00
parent c16725b61d
commit d69609abec

View File

@@ -308,20 +308,21 @@ jobs:
# Package
- name: Package
shell: bash
run: |
set -e
echo "Packaging for ${{ matrix.name }}..."
if [[ "${{ runner.os }}" == "Windows" ]]; then
# Windows packaging
# Windows packaging using PowerShell
echo "Creating Windows package..."
mkdir -p package
cp -r build/bin/${{ env.BUILD_TYPE }}/* package/ 2>/dev/null || echo "No Release binaries found, trying Debug..."
cp -r build/bin/Debug/* package/ 2>/dev/null || echo "No Debug binaries found"
cp -r assets package/ 2>/dev/null || echo "assets directory not found"
cp LICENSE package/ 2>/dev/null || echo "LICENSE not found"
cp README.md package/ 2>/dev/null || echo "README.md not found"
cd package && zip -r ../${{ matrix.artifact_name }}.zip *
# Use PowerShell Compress-Archive for Windows
powershell -Command "Compress-Archive -Path 'package\*' -DestinationPath '${{ matrix.artifact_name }}.zip' -Force"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
# macOS packaging using dedicated script