@@ -116,7 +116,15 @@ jobs:
116116 - name : Run publisher tests
117117 run : dotnet test dotnet/src/Devolutions.Pinget.Publisher.Tests/Devolutions.Pinget.Publisher.Tests.csproj -c Release
118118
119- - name : Check Rust and .NET publisher interoperability
119+ - name : Setup Python for independent publisher validation
120+ uses : actions/setup-python@v6
121+ with :
122+ python-version : ' 3.13'
123+
124+ - name : Install independent publisher validator dependency
125+ run : python -m pip install "PyYAML>=6,<7"
126+
127+ - name : Run Rust and .NET publisher interoperability
120128 shell : pwsh
121129 run : |
122130 cargo build --manifest-path rust/Cargo.toml -p pinget-cli --release
@@ -157,3 +165,71 @@ jobs:
157165 - name : Validate PowerShell module packaging
158166 shell : pwsh
159167 run : pwsh -NoLogo -NoProfile -File (Resolve-Path 'scripts/Build-PowerShellModule.ps1') -NoBuild -OutputRoot artifacts/ci-powershell -Clean
168+
169+ stock-winget-acceptance :
170+ name : Signed stock WinGet acceptance (ephemeral runner)
171+ runs-on : windows-latest
172+ needs :
173+ - dotnet
174+ timeout-minutes : 45
175+
176+ steps :
177+ - name : Checkout
178+ uses : actions/checkout@v6
179+
180+ - name : Setup .NET
181+ uses : actions/setup-dotnet@v5
182+ with :
183+ dotnet-version : 10.0.x
184+
185+ - name : Setup Rust
186+ shell : pwsh
187+ run : |
188+ rustup toolchain install stable --profile minimal --target x86_64-pc-windows-msvc
189+ rustup default stable
190+
191+ - name : Build disposable x64 publisher CLIs
192+ shell : pwsh
193+ run : |
194+ pwsh -NoLogo -NoProfile -File (Resolve-Path 'scripts/Build-CliNativeNuGetPackages.ps1') `
195+ -Package All `
196+ -RustRuntimeIdentifiers 'win-x64' `
197+ -DotNetRuntimeIdentifiers 'win-x64' `
198+ -NoPack `
199+ -Clean `
200+ -StagingRoot artifacts/ci-stock-winget `
201+ -OutputRoot artifacts/ci-stock-winget-packages
202+ if ($LASTEXITCODE -ne 0) { throw 'Building the disposable x64 publisher CLIs failed.' }
203+
204+ - name : Run signed stock WinGet acceptance with runner-local credentials
205+ shell : pwsh
206+ run : |
207+ $sdkRoot = Join-Path ${env:ProgramFiles(x86)} 'Windows Kits\10\bin'
208+ $sdkTools = Get-ChildItem -LiteralPath $sdkRoot -Directory |
209+ Sort-Object Name -Descending |
210+ ForEach-Object {
211+ [pscustomobject]@{
212+ MakeAppx = Join-Path $_.FullName 'x64\makeappx.exe'
213+ SignTool = Join-Path $_.FullName 'x64\signtool.exe'
214+ }
215+ } |
216+ Where-Object {
217+ (Test-Path -LiteralPath $_.MakeAppx) -and
218+ (Test-Path -LiteralPath $_.SignTool)
219+ } |
220+ Select-Object -First 1
221+ if (-not $sdkTools) { throw 'Windows SDK MakeAppx and SignTool were not found.' }
222+
223+ pwsh -NoLogo -NoProfile -File (Resolve-Path 'tests/publisher/run-ephemeral-host-publisher-gate.ps1') `
224+ -RustCliPath (Resolve-Path 'artifacts/ci-stock-winget/rust/win-x64/pinget.exe') `
225+ -DotnetCliPath (Resolve-Path 'artifacts/ci-stock-winget/dotnet-nativeaot/win-x64/pinget.exe') `
226+ -MakeAppxPath $sdkTools.MakeAppx `
227+ -SignToolPath $sdkTools.SignTool
228+ if ($LASTEXITCODE -ne 0) { throw 'Signed stock WinGet acceptance failed.' }
229+
230+ - name : Remove disposable build outputs
231+ if : always()
232+ shell : pwsh
233+ run : |
234+ Remove-Item -LiteralPath 'artifacts/ci-stock-winget' -Recurse -Force -ErrorAction SilentlyContinue
235+ Remove-Item -LiteralPath 'artifacts/ci-stock-winget-packages' -Recurse -Force -ErrorAction SilentlyContinue
0 commit comments