42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
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@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Add MSBuild to the PATH
|
|
uses: microsoft/setup-msbuild@v1
|
|
- 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: Create msi with PowerShell Script
|
|
run: pwsh -command ".\$GITHUB_WORKSPACE\create_msi.ps1"
|
|
- name: Sign msi with PowerShell Script
|
|
shell: powershell
|
|
run: .\$GITHUB_WORKSPACE\sign_files.ps1 -Path .\$GITHUB_WORKSPACE\Files -CertPath .\$GITHUB_WORKSPACE\codeSigningCert.pfx -CertPwd $env:SUPER_SECRET
|
|
- 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
|