Publish validation #8
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: Publish validation | |
| # Runs a full dotnet publish for win-x64/win-arm64 and packages the portable zip | |
| # without releasing, to catch packaging regressions between releases. Scheduled | |
| # weekly and on demand. | |
| on: | |
| schedule: | |
| - cron: "0 7 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish-smoke: | |
| name: Publish + package smoke test (windows-latest) | |
| runs-on: windows-latest | |
| env: | |
| AVALONIA_UI_LICENSE_KEY: ${{ secrets.AVALONIA_UI_LICENSE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up build | |
| uses: ./.github/actions/setup-build | |
| - name: Publish and package each architecture | |
| shell: pwsh | |
| run: | | |
| $version = "0.0.0-validation" | |
| $output = Join-Path $env:RUNNER_TEMP 'validation-assets' | |
| New-Item -ItemType Directory -Force -Path $output | Out-Null | |
| foreach ($rid in @('win-x64', 'win-arm64')) { | |
| $publishDir = Join-Path $env:RUNNER_TEMP "publish/$rid" | |
| dotnet publish Phantom.Workspaces/Phantom.Workspaces.csproj ` | |
| -c Release -r $rid -p:Version=$version -o $publishDir | |
| if ($LASTEXITCODE -ne 0) { throw "publish failed for $rid" } | |
| .\packaging\zip\New-ReleaseZip.ps1 ` | |
| -PublishDirectory $publishDir -Version $version ` | |
| -RuntimeIdentifier $rid -OutputDirectory $output | |
| } | |
| - name: Upload validation assets | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: publish-validation-assets | |
| path: ${{ runner.temp }}/validation-assets | |
| if-no-files-found: error |