Skip to content

Commit

Permalink
Merge pull request #1563 from json-api-dotnet/remove-install-powershell
Browse files Browse the repository at this point in the history
Remove installing PowerShell in cibuild, this is no longer needed
  • Loading branch information
bkoelman authored Jun 19, 2024
2 parents a7389ed + 8b0b90b commit 0941d7c
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,6 @@ jobs:
dotnet-version: |
6.0.x
8.0.x
- name: Setup PowerShell (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
dotnet tool install --global PowerShell
- name: Find latest PowerShell version (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
$packageName = "powershell"
$outputText = dotnet tool search $packageName --take 1
$outputLine = ("" + $outputText)
$indexOfVersionLine = $outputLine.IndexOf($packageName)
$latestVersion = $outputLine.substring($indexOfVersionLine + $packageName.length).trim().split(" ")[0].trim()
Write-Output "Found PowerShell version: $latestVersion"
Write-Output "POWERSHELL_LATEST_VERSION=$latestVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup PowerShell (Windows)
if: matrix.os == 'windows-latest'
shell: cmd
run: |
set DOWNLOAD_LINK=https://github.com/PowerShell/PowerShell/releases/download/v%POWERSHELL_LATEST_VERSION%/PowerShell-%POWERSHELL_LATEST_VERSION%-win-x64.msi
set OUTPUT_PATH=%RUNNER_TEMP%\PowerShell-%POWERSHELL_LATEST_VERSION%-win-x64.msi
echo Downloading from: %DOWNLOAD_LINK% to: %OUTPUT_PATH%
curl --location --output %OUTPUT_PATH% %DOWNLOAD_LINK%
msiexec.exe /package %OUTPUT_PATH% /quiet USE_MU=1 ENABLE_MU=1 ADD_PATH=1 DISABLE_TELEMETRY=1
- name: Setup PowerShell (macOS)
if: matrix.os == 'macos-latest'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask powershell
- name: Show installed versions
shell: pwsh
run: |
Expand Down

0 comments on commit 0941d7c

Please sign in to comment.