-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.29 KB
/
Copy pathverify-windows.yml
File metadata and controls
75 lines (63 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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