Skip to content

Commit

Permalink
Update build process to use Microsoft Build Tools for installing make…
Browse files Browse the repository at this point in the history
…appx.exe
  • Loading branch information
Thavarshan committed Aug 31, 2024
1 parent 74f2113 commit 52e036f
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,23 @@ jobs:
with:
node-version: '20'

- name: Install Visual Studio Build Tools with Windows SDK
- name: Install Microsoft Build Tools
run: |
curl -LO https://aka.ms/vs/17/release/vs_buildtools.exe
.\vs_buildtools.exe --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --quiet --wait --norestart
shell: cmd
choco install microsoft-build-tools -y
shell: pwsh

- name: Find and Verify makeappx.exe
- name: Verify makeappx.exe
run: |
$makeappxPath = Get-ChildItem -Path 'C:\' -Recurse -Filter 'makeappx.exe' -ErrorAction SilentlyContinue -Force | Select-Object -First 1 -ExpandProperty FullName
if ($makeappxPath) {
$makeappxPath = 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe'
if (Test-Path $makeappxPath) {
echo "makeappx.exe found at $makeappxPath"
$directory = [System.IO.Path]::GetDirectoryName($makeappxPath)
echo "WINDOWS_KIT_PATH=$directory" >> $env:GITHUB_ENV
echo "WINDOWS_KIT_PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit" >> $env:GITHUB_ENV
} else {
Write-Error "makeappx.exe not found."
exit 1
}
shell: pwsh



- name: Print Windows Kit Path
run: |
echo "Windows Kit Path: $env:WINDOWS_KIT_PATH"
Expand Down

0 comments on commit 52e036f

Please sign in to comment.