Skip to content

Commit

Permalink
Update BuildWin32.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 authored Oct 3, 2024
1 parent d8ed7b8 commit 36dea52
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/BuildWin32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -42,70 +41,61 @@ 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/[email protected]
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
- name: Upload the arm64 artifact
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/[email protected]
with:
Expand Down

0 comments on commit 36dea52

Please sign in to comment.