Add Inno Setup installer #916
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |