From 81fb3dd00d23d56d4b176de81f1a9eb358d49df7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 27 Aug 2025 14:57:32 +0300 Subject: [PATCH] Improve MSI artifact handling in Windows build workflow Adds logging to list MSI files after build steps for better visibility. Updates artifact selection logic to handle both 'ffmpeg' and 'FFmpeg' naming variations, and adds debugging output when standard MSI is not found. --- .github/workflows/build-windows.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 1481991..fa76371 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -91,6 +91,11 @@ jobs: python build\windows\setup.py bdist_msi if ($LASTEXITCODE -eq 0) { Write-Host "Standard MSI build completed successfully" + # List MSI files created + Write-Host "MSI files in dist directory after standard build:" + if (Test-Path "dist") { + Get-ChildItem -Path "dist" -Filter "*.msi" | ForEach-Object { Write-Host " $($_.Name)" } + } } else { Write-Host "Error building standard MSI - exit code: $LASTEXITCODE" # Continue anyway to try ZIP creation @@ -174,6 +179,11 @@ jobs: python build\windows\setup-ffmpeg.py bdist_msi if ($LASTEXITCODE -eq 0) { Write-Host "FFmpeg MSI build completed successfully" + # List MSI files created + Write-Host "MSI files in dist directory after FFmpeg build:" + if (Test-Path "dist") { + Get-ChildItem -Path "dist" -Filter "*.msi" | ForEach-Object { Write-Host " $($_.Name)" } + } } else { Write-Host "Error building FFmpeg MSI - exit code: $LASTEXITCODE" # Continue anyway to try ZIP creation @@ -206,12 +216,16 @@ jobs: } # Find and copy standard build artifacts from dist directory - $standardMsi = Get-ChildItem -Path "dist" -Filter "*.msi" | Where-Object { $_.Name -notlike "*ffmpeg*" } | Select-Object -First 1 + # Look for any MSI file that doesn't contain "ffmpeg" in the name + $standardMsi = Get-ChildItem -Path "dist" -Filter "*.msi" | Where-Object { $_.Name -notlike "*ffmpeg*" -and $_.Name -notlike "*FFmpeg*" } | Select-Object -First 1 if ($standardMsi) { Copy-Item $standardMsi.FullName "artifacts\YTSage-v$version.msi" Write-Host "Copied: $($standardMsi.Name) -> YTSage-v$version.msi" } else { Write-Host "Warning: Standard MSI not found" + # List all MSI files for debugging + Write-Host "Available MSI files:" + Get-ChildItem -Path "dist" -Filter "*.msi" | ForEach-Object { Write-Host " $($_.Name)" } } $standardZip = Get-ChildItem -Path "dist" -Filter "YTSage-v$version.zip" | Select-Object -First 1 @@ -223,7 +237,8 @@ jobs: } # Find and copy FFmpeg build artifacts from dist directory - $ffmpegMsi = Get-ChildItem -Path "dist" -Filter "*.msi" | Where-Object { $_.Name -like "*ffmpeg*" } | Select-Object -First 1 + # Look for any MSI file that contains "ffmpeg" or "FFmpeg" in the name + $ffmpegMsi = Get-ChildItem -Path "dist" -Filter "*.msi" | Where-Object { $_.Name -like "*ffmpeg*" -or $_.Name -like "*FFmpeg*" } | Select-Object -First 1 if ($ffmpegMsi) { Copy-Item $ffmpegMsi.FullName "artifacts\YTSage-v$version-ffmpeg.msi" Write-Host "Copied: $($ffmpegMsi.Name) -> YTSage-v$version-ffmpeg.msi"