Skip to content

Improve exception handling #82

Improve exception handling

Improve exception handling #82

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_call:
jobs:
build:
runs-on: windows-latest
env:
solution: AmagnoVirtualPrinter.sln
configuration: Release
certificatepassword: ${{ secrets.CERTIFICATEPASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set version
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\Set-Version.ps1
- name: Add MSBuild to the PATH
uses: microsoft/setup-msbuild@v2
- name: Restore the application
run: msbuild $env:solution /m /t:Restore /p:Configuration=$env:configuration
- name: Build solution
run: msbuild $env:solution /m /t:Rebuild /p:Configuration=$env:configuration
- name: Sign setup files with PowerShell Script
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\sign_files.ps1 -Path .\$GITHUB_WORKSPACE\Files -CertPath .\$GITHUB_WORKSPACE\codeSigningCert.pfx -CertPwd $env:certificatepassword
- name: Create msi with PowerShell Script
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
- name: Sign msi with PowerShell Script
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\sign_setup.ps1 -CertPath .\$GITHUB_WORKSPACE\codeSigningCert.pfx -CertPwd $env:certificatepassword
- name: Upload files artifact
uses: actions/upload-artifact@v3
with:
name: files
path: files/**/*
- name: Upload installer artifact
uses: actions/upload-artifact@v3
with:
name: installer
path: ${{github.workspace}}\AmagnoPrinterInstaller.msi