From 36dea5241a22c3676592860d92c4c81de1811cae Mon Sep 17 00:00:00 2001 From: Ruben Date: Thu, 3 Oct 2024 14:32:21 +0200 Subject: [PATCH] Update BuildWin32.yml --- .github/workflows/BuildWin32.yml | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/BuildWin32.yml b/.github/workflows/BuildWin32.yml index 15c8509a7..3bb6b74bd 100644 --- a/.github/workflows/BuildWin32.yml +++ b/.github/workflows/BuildWin32.yml @@ -33,7 +33,6 @@ jobs: # Step 4 (x64): Publish x64 version - name: Publish x64 version run: | - # Call the PowerShell script with x64 as the platform argument pwsh -File "${{ github.workspace }}\Build\Build Avalonia.Win32.ps1" -Platform "x64" shell: pwsh @@ -42,44 +41,39 @@ jobs: uses: actions/upload-artifact@v4 with: name: PicView-v${{steps.get-version.outputs.file-version}}-win-x64 - path: ${{ github.workspace }}\Build\ + path: ${{ github.workspace }}\Build\output\x64 retention-days: 14 # Step 6 (x64): Generate the Inno Setup Installer and copy x64 files to the build directory - name: Generate Inno Setup variables and copy x64 files to Build directory run: | - # Create the directory inside 'Build' - $buildDir = Join-Path -Path "${{ github.workspace }}" -ChildPath "Build\install" + $buildDir = Join-Path -Path "${{ github.workspace }}" -ChildPath "Build\install\x64" if (Test-Path $buildDir) { Remove-Item -Path $buildDir -Recurse -Force } New-Item -Path $buildDir -ItemType Directory | Out-Null - - # Copy the portable build output to this new directory - $outputPath = "${{ steps.paths.outputs.output_dir }}" - Copy-Item -Path "$outputPath\*" -Destination $buildDir -Recurse -Force + Copy-Item -Path "${{ github.workspace }}\Build\output\x64\*" -Destination $buildDir -Recurse -Force shell: pwsh - # Step 7 (x64): Compile .ISS to .EXE Installer for x64 + # Step 7 (x64): Compile .ISS to .EXE Installer for x64 - name: Compile .ISS to .EXE Installer (x64) uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 with: path: .\Build\install.iss - options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install /DMyFileSource=${{ github.workspace }}\Build\install /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt + options: /O+ /DMyAppVersion=${{steps.get-version.outputs.file-version}} /DMyAppOutputDir=${{ github.workspace }}\Build\install\x64 /DMyFileSource=${{ github.workspace }}\Build\install\x64 /DAppIcon=${{ github.workspace }}\src\PicView.Avalonia.Win32\icon.ico /DLicenseFile=${{ github.workspace }}\src\PicView.Core\Licenses\LICENSE.txt # Step 8 (x64): Upload the Inno Setup Installer for x64 as an artifact - name: Upload Inno Setup Installer (x64) uses: actions/upload-artifact@v4 with: name: PicView-${{steps.get-version.outputs.file-version}}-installer-x64 - path: ${{ github.workspace }}\Build\install\PicView-${{steps.get-version.outputs.file-version}}.exe + path: ${{ github.workspace }}\Build\install\x64\PicView-${{steps.get-version.outputs.file-version}}.exe retention-days: 14 # Step 4 (arm64): Publish arm64 version - name: Publish arm64 version run: | - # Call the PowerShell script with arm64 as the platform argument - pwsh -File "${{ github.workspace }}\Build Avalonia.Win32.ps1" -Platform "arm64" + pwsh -File "${{ github.workspace }}\Build\Build Avalonia.Win32.ps1" -Platform "arm64" shell: pwsh # Step 5 (arm64): Upload the arm64 zip file as an artifact @@ -87,25 +81,21 @@ jobs: uses: actions/upload-artifact@v4 with: name: PicView-v${{steps.get-version.outputs.file-version}}-win-arm64 - path: ${{ steps.paths.outputs.output_dir }} + path: ${{ github.workspace }}\Build\output\arm64 retention-days: 14 # Step 6 (arm64): Generate the Inno Setup Installer and copy arm64 files to the build directory - name: Generate Inno Setup variables and copy arm64 files to Build directory run: | - # Create the directory inside 'Build' $buildDir = Join-Path -Path "${{ github.workspace }}" -ChildPath "Build\install_arm64" if (Test-Path $buildDir) { Remove-Item -Path $buildDir -Recurse -Force } New-Item -Path $buildDir -ItemType Directory | Out-Null - - # Copy the portable build output to this new directory - $outputPath = "${{ steps.paths.outputs.output_dir }}" - Copy-Item -Path "$outputPath\*" -Destination $buildDir -Recurse -Force + Copy-Item -Path "${{ github.workspace }}\Build\output\arm64\*" -Destination $buildDir -Recurse -Force shell: pwsh - # Step 7 (arm64): Compile .ISS to .EXE Installer for arm64 + # Step 7 (arm64): Compile .ISS to .EXE Installer for arm64 - name: Compile .ISS to .EXE Installer (arm64) uses: Minionguyjpro/Inno-Setup-Action@v1.2.5 with: