Skip to content

Commit 28ab412

Browse files
authored
Update build.yml
1 parent d6e85a3 commit 28ab412

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,21 @@ jobs:
6767
Write-Warning " -> The final output path does not exist. This could be a problem."
6868
}
6969
70-
echo "output_path=$fullOutputPath" >> $GITHUB_OUTPUT
70+
echo "full_output_path=$fullOutputPath" >> $env:GITHUB_ENV
7171
7272
Write-Host "9. output_path variable set for subsequent steps."
7373
Write-Host "--- End Path Determination Log ---"
7474
7575
- name: Zip the build output
7676
run: |
77-
Compress-Archive -Path "${{ steps.get_output_path.outputs.output_path }}\*" -DestinationPath "wpf-app-release.zip"
77+
$outputPath = $env:full_output_path
78+
Write-Host "Attempting to zip from path: $outputPath"
79+
if ([string]::IsNullOrEmpty($outputPath) -or (-not (Test-Path -Path $outputPath))) {
80+
Write-Warning "Source path is empty or does not exist. Skipping zip."
81+
exit 1
82+
}
83+
Compress-Archive -Path "$outputPath\*" -DestinationPath "wpf-app-release.zip" -Force
84+
Write-Host "Zipping complete."
7885
7986
- name: Upload the zipped artifact
8087
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)