Skip to content

Verify Windows

Verify Windows #8

name: Verify Windows
on:
workflow_run:
workflows: ["Build Windows"]
types:
- completed
workflow_dispatch:
inputs:
build_run_id:
description: 'Build Windows workflow run ID'
required: true
jobs:
verify:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
runs-on: windows-latest
steps:
- name: Download MSIX artifact
uses: actions/download-artifact@v7
with:
name: windows-msix
path: msix
run-id: ${{ inputs.build_run_id || github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download metadata artifact
uses: actions/download-artifact@v7
with:
name: windows-metadata
path: metadata
run-id: ${{ inputs.build_run_id || github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Windows App Certification Kit
shell: pwsh
run: |
$appcert = "${env:ProgramFiles(x86)}\Windows Kits\10\App Certification Kit\appcert.exe"
$msixFile = (Get-ChildItem -Path msix -Filter "*.msix" | Select-Object -First 1).FullName
$reportPath = "$env:GITHUB_WORKSPACE\certification-report.xml"
Write-Host "MSIX file: $msixFile"
Write-Host "Report path: $reportPath"
& $appcert reset
& $appcert test -appxpackagepath $msixFile -reportoutputpath $reportPath
[xml]$report = Get-Content $reportPath
$overallResult = $report.REPORT.OVERALL_RESULT
Write-Host "Overall result: $overallResult"
if ($overallResult -ne "PASS") {
Write-Host "::error::WACK certification failed: $overallResult"
exit 1
}
- name: Upload certification report
uses: actions/upload-artifact@v6
if: always()
with:
name: wack-certification-report
path: certification-report.xml
- name: Re-upload MSIX artifact
uses: actions/upload-artifact@v6
with:
name: windows-msix
path: msix/*.msix
- name: Re-upload metadata artifact
uses: actions/upload-artifact@v6
with:
name: windows-metadata
path: metadata/metadata.json