From f282aa91c97fc7a4f277e33fb258cb55e97bf921 Mon Sep 17 00:00:00 2001 From: lml Date: Sun, 15 Mar 2026 21:51:06 +0800 Subject: [PATCH] fix: Update Windows release build to use backslashes for paths, add a directory existence check, and force archive compression. --- .github/workflows/release.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c21580a..a9a2e94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,9 +79,17 @@ jobs: shell: pwsh run: | $APP_NAME = "caption_trans" - $RELEASE_DIR = "build/windows/x64/runner/Release" + $RELEASE_DIR = "build\windows\x64\runner\Release" $ZIP_NAME = "${APP_NAME}-windows-x64.zip" - Compress-Archive -Path "$RELEASE_DIR/*" -DestinationPath "$ZIP_NAME" + + # Verify directory exists + if (!(Test-Path $RELEASE_DIR)) { + Write-Error "Release directory not found: $RELEASE_DIR" + exit 1 + } + + # Package using relative path to avoid prefix issues + Compress-Archive -Path "$RELEASE_DIR\*" -DestinationPath "$ZIP_NAME" -Force - name: Upload Windows Artifact uses: actions/upload-artifact@v4