From 45fff1bbc993b3ce21392110aca34b4b6e14a88a Mon Sep 17 00:00:00 2001 From: oberrich Date: Fri, 10 Jan 2025 01:35:47 +0100 Subject: [PATCH] chore: use nushell in ci --- .github/workflows/rust.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b950ded..b386317 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -50,15 +50,12 @@ jobs: [string]$packageUrl, # URL to download the package from [string]$packageName # Name of the package (for path management) ) - - # Define file paths + + $msixBundlePath = "$env:RUNNER_TEMP\$packageName.msixbundle" $archivePath = "$env:RUNNER_TEMP\$packageName.zip" $extractPath = "$env:RUNNER_TEMP\$packageName" $msixPath = "$env:RUNNER_TEMP\Microsoft.DesktopAppInstaller.msixbundle" - - # Download the package - - # If it's a .zip file (for .appx), extract it + if ($packageUrl -like "*nuget*") { Invoke-WebRequest -Uri $packageUrl -OutFile $archivePath -UseBasicParsing New-Item -ItemType Directory -Force -Path $extractPath @@ -72,10 +69,9 @@ jobs: # Clean up .zip and extracted folder Remove-Item -Path $archivePath, $extractPath -Recurse } - # If it's an MSIX bundle (for .msix), just install it elseif ($packageUrl -like "*msixbundle*") { - Invoke-WebRequest -Uri $packageUrl -OutFile "$extractPath.msixbundle" -UseBasicParsing - Add-AppxPackage -Path "$extractPath.msixbundle"h + Invoke-WebRequest -Uri $packageUrl -OutFile $msixBundlePath -UseBasicParsing + Add-AppxPackage -Path $msixBundlePath Remove-Item -Path "$extractPath.msixbundle" -Force } else {