Skip to content

Commit

Permalink
chore: use nushell in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Jan 10, 2025
1 parent aa75dc4 commit 45fff1b
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 45fff1b

Please sign in to comment.