diff --git a/.github/workflows/Deploy_Desktop.yml b/.github/workflows/Deploy_Desktop.yml index 224db3e6..bf7b5110 100644 --- a/.github/workflows/Deploy_Desktop.yml +++ b/.github/workflows/Deploy_Desktop.yml @@ -308,7 +308,7 @@ jobs: $zip86Hash.Hash | Out-File -Encoding 'UTF8' "./StandaloneSigned/PresenceLight.${{ env.VERSION }}-x86.zip.sha256" $zipARMHash = Get-FileHash "./StandaloneSigned/PresenceLight.${{ env.VERSION }}-win-arm64.zip" -Algorithm SHA256 - $zipARMHash.Hash | Out-File -Encoding 'UTF8' "./StandaloneSigned/PresenceLight.${{ env.VERSION }}-win.arm64.zip.sha256" + $zipARMHash.Hash | Out-File -Encoding 'UTF8' "./StandaloneSigned/PresenceLight.${{ env.VERSION }}-win-arm64.zip.sha256" $appxHash = Get-FileHash "./ReleaseSigned/PresenceLight.Package_${{ env.VERSION }}.0_Test/PresenceLight.Package_${{ env.VERSION }}.0_x64_x86_ARM64.appxbundle" -Algorithm SHA256 $appxHash.Hash | Out-File -Encoding 'UTF8' "./ReleaseSigned/PresenceLight.Package_${{ env.VERSION }}.0_x64_x86_ARM64.appxbundle.sha256" diff --git a/Build/winget/build.ps1 b/Build/winget/build.ps1 index 5b84bb4d..c7fa552e 100644 --- a/Build/winget/build.ps1 +++ b/Build/winget/build.ps1 @@ -42,29 +42,38 @@ function Write-MetaData { $content | Out-File -Encoding 'UTF8' "./$Version/$FileName" } -New-Item -Path $PWD -Name $Version -ItemType "directory" -# Get all files inside the folder and adjust the version/hash -$Hash = Get-Hash -Version "$Version" -Get-ChildItem '*.yaml' | ForEach-Object -Process { - Write-MetaData -FileName $_.Name -Version $Version -Hash $Hash -} -if (-not $Token) { - return -} +# New-Item -Path $PWD -Name $Version -ItemType "directory" +# # Get all files inside the folder and adjust the version/hash +# $Hash = Get-Hash -Version "$Version" +# Get-ChildItem '*.yaml' | ForEach-Object -Process { +# Write-MetaData -FileName $_.Name -Version $Version -Hash $Hash +# } +# if (-not $Token) { +# return +# } + +# # Install the latest wingetcreate exe +# # Need to do things this way, see https://github.com/PowerShell/PowerShell/issues/13138 +# Import-Module Appx -UseWindowsPowerShell + +# # Download and install C++ Runtime framework package. +# $vcLibsBundleFile = ".\Microsoft.VCLibs.Desktop.appx" +# Invoke-WebRequest https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile $vcLibsBundleFile +# Add-AppxPackage $vcLibsBundleFile + +# # Download Winget-Create msixbundle, install, and execute update. +# $appxBundleFile = ".\wingetcreate.msixbundle" +# Invoke-WebRequest https://aka.ms/wingetcreate/latest/msixbundle -OutFile $appxBundleFile +# Add-AppxPackage $appxBundleFile -# Install the latest wingetcreate exe -# Need to do things this way, see https://github.com/PowerShell/PowerShell/issues/13138 -Import-Module Appx -UseWindowsPowerShell +$github = Invoke-RestMethod -uri "https://api.github.com/repos/microsoft/devhome/releases" +$targetRelease = $github | Where-Object -Property name -match "Desktop-v$Version" | Select-Object -First 1 -# Download and install C++ Runtime framework package. -$vcLibsBundleFile = ".\Microsoft.VCLibs.Desktop.appx" -Invoke-WebRequest https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile $vcLibsBundleFile -Add-AppxPackage $vcLibsBundleFile +$installerUrl = $targetRelease | Select-Object -ExpandProperty assets -First 1 | Where-Object -Property name -match '*.appxbundle' | Select-Object -ExpandProperty browser_download_url -# Download Winget-Create msixbundle, install, and execute update. -$appxBundleFile = ".\wingetcreate.msixbundle" -Invoke-WebRequest https://aka.ms/wingetcreate/latest/msixbundle -OutFile $appxBundleFile -Add-AppxPackage $appxBundleFile +# Update package using wingetcreate +Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe +.\wingetcreate.exe update "isaaclevin.presencelight" --version $Version --urls "$installerUrl" --submit --token $gitToken # Create the PR -wingetcreate submit --token $Token $Version \ No newline at end of file +#wingetcreate submit --token $Token $Version \ No newline at end of file