Phase 2: Avalonia GUI #16
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: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| # OpenKey targets net10.0-windows and uses DPAPI, so it cannot build or test on Linux. | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # No version here: global.json pins the SDK, so CI and a developer machine agree. | |
| - uses: actions/setup-dotnet@v4 | |
| - name: Restore | |
| run: dotnet restore | |
| # Directory.Build.props sets TreatWarningsAsErrors, and IsAotCompatible turns the | |
| # trim/AOT analyzers on, so this is a strict gate rather than a formality. | |
| - name: Build | |
| run: dotnet build --no-restore -c Release | |
| - name: Test | |
| run: dotnet test --no-build -c Release --verbosity normal | |
| # Proves the publish profile in each csproj still produces the shipping artifact without | |
| # anyone pasting flags from a README. | |
| - name: Verify console publish | |
| run: dotnet publish src/OpenKey/OpenKey.csproj -c Release -r win-x64 -o publish-check/console | |
| - name: Verify app publish | |
| run: dotnet publish src/OpenKey.Gui/OpenKey.Gui.csproj -c Release -r win-x64 -o publish-check/app | |
| - name: Confirm both binaries exist | |
| shell: pwsh | |
| run: | | |
| foreach ($p in @("publish-check/console/OpenKey.exe", "publish-check/app/OpenKeyApp.exe")) { | |
| if (-not (Test-Path $p)) { throw "Expected $p to exist" } | |
| $mb = [math]::Round((Get-Item $p).Length / 1MB, 1) | |
| Write-Host "$p is $mb MB" | |
| } |