Skip to content

Commit

Permalink
Update build process to use Windows Kit path with makeappx.exe
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Aug 31, 2024
1 parent 7727655 commit 38d58e7
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,11 @@ jobs:

- name: Find Windows Kit Path
run: |
$windowsKitPath = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Directory | Where-Object { Test-Path "$($_.FullName)\makeappx.exe" }).FullName
$windowsKitPath = (Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -File -Filter "makeappx.exe" | Select-Object -First 1).DirectoryName
echo "WINDOWS_KIT_PATH=$windowsKitPath" >> $GITHUB_ENV
shell: pwsh

- name: Build app
run: npm run make
env:
WINDOWS_KIT_PATH: ${{ env.WINDOWS_KIT_PATH }}

- name: Extract version from package.json
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
echo "VERSION=$VERSION" >> $GITHUB_ENV
shell: pwsh

- name: Upload files to Cloudflare R2
- name: Print Windows Kit Path
run: |
Get-ChildItem -Path out\appx\ -File | ForEach-Object {
Write-Host "Uploading $($_.Name)"
aws s3 cp $_.FullName "s3://${{ secrets.R2_BUCKET }}/releases/v${{ env.VERSION }}/$($_.Name)" `
--endpoint-url="${{ secrets.R2_ENDPOINT }}" --debug
}
echo "Windows Kit Path: $WINDOWS_KIT_PATH"
shell: pwsh
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.R2_REGION }}

0 comments on commit 38d58e7

Please sign in to comment.