-
Notifications
You must be signed in to change notification settings - Fork 229
52 lines (42 loc) · 1.7 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
49
50
51
52
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
target: [ [x64, net471], [x86, net471], [x64_net6, net6.0-windows], [x86_net6, net6.0-windows], [arm64_net6, net6.0-windows] ]
runs-on: windows-latest
env:
installer: Installer\CairoShell.nsi
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install nbgv
uses: dotnet/nbgv@v0.4.1
id: nbgv
- name: Publish app
run: |
cd "Cairo Desktop\Cairo Desktop"
dotnet publish -p:PublishProfile=$env:Profile -p:Platform=$env:Platform -f $env:Framework
env:
Profile: ${{ matrix.target[0] }}
Framework: ${{ matrix.target[1] }}
Platform: ${{ matrix.target[0] == 'x86' && 'AnyCPU' || matrix.target[0] == 'x86_net6' && 'AnyCPU' || matrix.target[0] == 'x64' && 'x64' || matrix.target[0] == 'x64_net6' && 'x64' || 'ARM64' }}
- name: Set installer version
shell: pwsh
run: |
$fileContent = [System.IO.File]::ReadAllText("${{ env.installer }}").Replace("BUILD_VERSION", "${{ steps.nbgv.outputs.SimpleVersion }}")
[System.IO.File]::WriteAllText("${{ env.installer }}", $fileContent)
- name: Generate installer
run: makensis Installer\CairoShell_${{ matrix.target[0] }}.nsi
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Installer ${{ matrix.target[0] == 'x86' && '32-bit' || matrix.target[0] == 'x86_net6' && '32-bit .NET 6' || matrix.target[0] == 'x64' && '64-bit' || matrix.target[0] == 'x64_net6' && '64-bit .NET 6' || 'ARM64' }}
path: 'Installer\*.exe'