-
Notifications
You must be signed in to change notification settings - Fork 274
93 lines (76 loc) · 2.89 KB
/
retrobar.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: RetroBar
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build
strategy:
matrix:
publishprofile: [ [x64, net6.0-windows], [x86, net6.0-windows], [ARM64, net6.0-windows], [x64-full, net6.0-windows], [x86-full, net6.0-windows], [ARM64-full, net6.0-windows] ]
outputs:
version: ${{ steps.nbgv.outputs.SimpleVersion }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install nbgv
id: nbgv
uses: dotnet/[email protected]
- name: Publish app
run: dotnet publish -p:PublishProfile=$env:Profile -f $env:Framework
env:
Profile: ${{ matrix.publishprofile[0] }}
Framework: ${{ matrix.publishprofile[1] }}
- name: Copy license
run: cp DistLicense.txt RetroBar\bin\Release\${{ matrix.publishprofile[1] }}\publish-${{ matrix.publishprofile[0] }}\License.txt
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: RetroBar ${{ matrix.publishprofile[0] == 'x86' && '32-bit' || matrix.publishprofile[0] == 'x64' && '64-bit' || matrix.publishprofile[0] == 'ARM64' && 'ARM64' || matrix.publishprofile[0] == 'x86-full' && '32-bit Full' || matrix.publishprofile[0] == 'x64-full' && '64-bit Full' || 'ARM64 Full' }}
path: RetroBar\bin\Release\${{ matrix.publishprofile[1] }}\publish-${{ matrix.publishprofile[0] }}\
installer:
name: Installer
needs: [ build ]
runs-on: windows-latest
env:
installer: installer.iss
targetFramework: net6.0-windows
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts - ARM64
uses: actions/download-artifact@v4
with:
name: RetroBar ARM64 Full
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-ARM64-full\
- name: Download build artifacts - x64
uses: actions/download-artifact@v4
with:
name: RetroBar 64-bit Full
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-x64-full\
- name: Download build artifacts - x86
uses: actions/download-artifact@v4
with:
name: RetroBar 32-bit Full
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-x86-full\
- name: Set installer version
shell: pwsh
run: |
$fileContent = [System.IO.File]::ReadAllText("${{ env.installer }}").Replace("BUILD_VERSION", "${{ needs.build.outputs.version }}")
[System.IO.File]::WriteAllText("${{ env.installer }}", $fileContent)
- name: Compile Inno Setup installer
uses: Minionguyjpro/[email protected]
with:
path: ${{ env.installer }}
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: RetroBar Installer
path: bin\RetroBarInstaller.exe