refactor: extract App.OnStartup into named startup phases #66
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| tags: ['v*'] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # MinVer needs full history for version calculation | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Build | |
| run: dotnet build -c Release | |
| release: | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # MinVer needs full history for version calculation | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Publish | |
| run: dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release -r win-x64 --no-self-contained -o publish/ | |
| - name: Publish (self-contained) | |
| run: dotnet publish src/PayBeat.App/PayBeat.App.csproj -c Release -r win-x64 --self-contained -o publish-selfcontained/ | |
| - name: Zip artifact | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}" | |
| $zipName = "PayBeat-$version-portable-runtime-required-win-x64.zip" | |
| Compress-Archive -Path "publish/*" -DestinationPath $zipName | |
| echo "ZIP_NAME=$zipName" >> $env:GITHUB_ENV | |
| - name: Zip artifact (self-contained) | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}" | |
| $zipNameSelfContained = "PayBeat-$version-portable-standalone-win-x64.zip" | |
| Compress-Archive -Path "publish-selfcontained/*" -DestinationPath $zipNameSelfContained | |
| echo "ZIP_NAME_SELFCONTAINED=$zipNameSelfContained" >> $env:GITHUB_ENV | |
| - name: Install Inno Setup | |
| run: winget install --id JRSoftware.InnoSetup.7 -e --source winget --accept-package-agreements --accept-source-agreements --disable-interactivity | |
| - name: Build installer | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}".TrimStart('v') | |
| $iscc = (Get-ChildItem "$env:LocalAppData\Programs\Inno Setup*\ISCC.exe", "C:\Program Files*\Inno Setup*\ISCC.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1).FullName | |
| & $iscc installer\PayBeat.iss "/DAppVersion=$version" | |
| $setupName = Get-ChildItem "installer-output\*.exe" | Select-Object -First 1 -ExpandProperty Name | |
| echo "SETUP_NAME=installer-output/$setupName" >> $env:GITHUB_ENV | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: PayBeat ${{ github.ref_name }} | |
| files: | | |
| ${{ env.ZIP_NAME }} | |
| ${{ env.ZIP_NAME_SELFCONTAINED }} | |
| ${{ env.SETUP_NAME }} | |
| generate_release_notes: true | |
| prerelease: ${{ contains(github.ref_name, '-') }} |