@@ -80,18 +80,23 @@ jobs:
8080 run : |
8181 $APP_NAME = "caption_trans"
8282 $WORKSPACE = "${{ github.workspace }}"
83- $BUILD_OUTPUT = Join-Path $WORKSPACE "build\windows\x64\runner\Release"
84- $ZIP_NAME = Join-Path $WORKSPACE "${APP_NAME}-windows-x64.zip"
8583
86- Write-Host "Checking for build output at: $BUILD_OUTPUT"
84+ Write-Host "Searching for the executable in the build directory..."
85+ # Search for the .exe file in the build\windows folder
86+ $exeFile = Get-ChildItem -Path "$WORKSPACE\build\windows" -Filter "${APP_NAME}.exe" -Recurse | Select-Object -First 1
8787
88- if (Test-Path $BUILD_OUTPUT) {
89- Write-Host "Found release directory. Packaging..."
90- Compress-Archive -Path "$BUILD_OUTPUT\*" -DestinationPath "$ZIP_NAME" -Force
88+ if ($exeFile) {
89+ $releaseDir = $exeFile.DirectoryName
90+ $ZIP_NAME = Join-Path $WORKSPACE "${APP_NAME}-windows-x64.zip"
91+ Write-Host "Found executable at: $($exeFile.FullName)"
92+ Write-Host "Packaging directory: $releaseDir"
93+
94+ Compress-Archive -Path "$releaseDir\*" -DestinationPath "$ZIP_NAME" -Force
95+ Write-Host "Successfully created $ZIP_NAME"
9196 } else {
92- Write-Host "!!! Error: Release directory not found at expected path !!!"
93- Write-Host "Listing $WORKSPACE contents :"
94- Get-ChildItem -Path $WORKSPACE -Recurse -Depth 3 | Select-Object FullName
97+ Write-Host "!!! Error: Could not find ${APP_NAME}.exe anywhere in build\windows !!!"
98+ Write-Host "Listing build\windows structure for debugging :"
99+ Get-ChildItem -Path " $WORKSPACE\build\windows" -Recurse -Depth 4 | Select-Object FullName
95100 exit 1
96101 }
97102
0 commit comments