From f0533ae8c7109ec4d028610ebe03b5ab79743bc1 Mon Sep 17 00:00:00 2001 From: 13MrBlackCat13 Date: Thu, 7 Nov 2024 10:00:52 +0100 Subject: [PATCH] Fix Windows build path and add diagnostics --- .github/workflows/release.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 033afdf..ad49142 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,20 +58,33 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | + Write-Host "Current directory: $(Get-Location)" + Write-Host "Contents of current directory:" + Get-ChildItem -Recurse + + New-Item -ItemType Directory -Force -Path "dist" + jpackage --input target/ ` --main-jar Sudoku.jar ` --main-class App ` --type exe ` --name Sudoku ` + --dest dist ` --app-version ${{ needs.prepare.outputs.version }} ` --win-dir-chooser ` --win-menu ` --win-shortcut - if (Test-Path "Sudoku.exe") { - Compress-Archive -Path "Sudoku.exe" -DestinationPath ${{ matrix.artifact_name }} + Write-Host "Contents after build:" + Get-ChildItem -Recurse + + if (Test-Path "dist\Sudoku.exe") { + Write-Host "Found Sudoku.exe, creating archive..." + Compress-Archive -Path "dist\Sudoku.exe" -DestinationPath ${{ matrix.artifact_name }} } else { - Write-Error "Sudoku.exe not found!" + Write-Host "Contents of dist directory:" + Get-ChildItem dist + Write-Error "Sudoku.exe not found in dist directory!" exit 1 }