-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.65 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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: Set version
shell: powershell
run: powershell -file .\$GITHUB_WORKSPACE\Set-Version.ps1
- 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: 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