diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index dca2ba7..0052a94 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -44,7 +44,13 @@ jobs: - name: Verify physical compatibility matrix shell: pwsh - run: .\build\Verify-CompatibilityMatrix.ps1 + run: | + if ("${{ github.event_name }}" -eq "release" -and "${{ github.event.release.prerelease }}" -eq "true") { + .\build\Verify-CompatibilityMatrix.ps1 -AllowPending + } + else { + .\build\Verify-CompatibilityMatrix.ps1 + } - name: Pack run: dotnet pack src\HyperVConsoleKit\HyperVConsoleKit.csproj --configuration Release --no-build --output artifacts\packages diff --git a/build/Verify-CompatibilityMatrix.ps1 b/build/Verify-CompatibilityMatrix.ps1 index 2083fcf..2a3b740 100644 --- a/build/Verify-CompatibilityMatrix.ps1 +++ b/build/Verify-CompatibilityMatrix.ps1 @@ -1,5 +1,7 @@ param( - [string]$MatrixPath = 'validation\compatibility-matrix.json' + [string]$MatrixPath = 'validation\compatibility-matrix.json', + + [switch]$AllowPending ) $ErrorActionPreference = 'Stop' @@ -8,6 +10,11 @@ $matrix = Get-Content -LiteralPath $MatrixPath -Raw | ConvertFrom-Json $pending = @($matrix.required | Where-Object { $_.status -ne 'Pass' }) if ($pending.Count -gt 0) { $names = $pending | ForEach-Object { "$($_.operatingSystem) $($_.architecture): $($_.status)" } + if ($AllowPending) { + Write-Warning "Publishing an explicitly unvalidated prerelease with pending physical compatibility results: $($names -join '; ')" + return + } + throw "Physical compatibility validation is incomplete: $($names -join '; ')" } diff --git a/docs/COMPATIBILITY_VALIDATION.md b/docs/COMPATIBILITY_VALIDATION.md index 6685b62..fd4366a 100644 --- a/docs/COMPATIBILITY_VALIDATION.md +++ b/docs/COMPATIBILITY_VALIDATION.md @@ -49,3 +49,7 @@ Repeat the probe under `LocalSystem`, using the same files and VM. Retain the JS process architecture, package version, per-check results, loaded managed assemblies, and loaded native modules. CI success is not a substitute for these physical-host results. + +An explicitly approved GitHub prerelease may be published while matrix entries remain pending so the exact package +can be deployed for compatibility testing. Stable releases and manual publish-workflow dispatches remain blocked +until every required matrix entry passes.