Add Inno Setup installer #910
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] ] | |
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' || 'ARM64' }} | |
path: RetroBar\bin\Release\${{ matrix.publishprofile[1] }}\publish-${{ matrix.publishprofile[0] }}\ | |
installer: | |
name: Installer | |
needs: [ build ] | |
runs-on: windows-latest | |
env: | |
installer: setup.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 | |
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-ARM64\ | |
- name: Download build artifacts - x64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: RetroBar 64-bit | |
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-x64\ | |
- name: Download build artifacts - x86 | |
uses: actions/download-artifact@v4 | |
with: | |
name: RetroBar 32-bit | |
path: RetroBar\bin\Release\${{ env.targetFramework }}\publish-x86\ | |
- 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\RetroBarSetup.exe |