Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
Upgrade PowerShell from LTS to current in GitHub Action, manifest ver…
Browse files Browse the repository at this point in the history
…sion 7.3 again (#74)

* Update bicepVersion

* upgrade powershell from LTS in pipeline

* manifest 7.3 re-bump

---------

Co-authored-by: Simon Wåhlin <[email protected]>
  • Loading branch information
PalmEmanuel and SimonWahlin authored Jun 14, 2023
1 parent 0975164 commit 33ab663
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,23 @@ jobs:
with:
fetch-depth: 0

- name: Upgrade to latest preview of powershell
- name: Update PowerShell from LTS
shell: pwsh
run: |
Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -Quiet"
$env:GITHUB_PATH = '/home/runner/.powershell:' + $env:GITHUB_PATH
# Most of the code is from https://aka.ms/install-powershell.ps1 but adapted for GITHUB_PATH
$Destination = "~/.powershell"
if (-not (Test-Path -Path $Destination)) { New-Item -ItemType Directory -Path $Destination }
Invoke-Expression "& { $(irm https://aka.ms/install-powershell.ps1) } -Destination $Destination"
$TargetPath = Join-Path -Path $Destination -ChildPath "pwsh"
$Symlink = "/usr/bin/pwsh"
$Uid = id -u
if ($Uid -ne "0") { $SUDO = "sudo" } else { $SUDO = "" }
# Make symbolic link point to installed path
& $SUDO ln -fs $TargetPath $Symlink
if ($LASTEXITCODE -ne 0) { throw "Could not add to GITHUB_PATH: failed to make '$Symlink' point to '$TargetPath'." }
- name: Set PSModulePath
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion BicepNet.PS/Manifest/BicepNet.PS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
BicepNet is developed for the Bicep PowerShell module but could be used for any other project where you want to leverage Bicep functionality in PowerShell or .NET.'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '7.2'
PowerShellVersion = '7.3'

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = '4.6.1'
Expand Down

0 comments on commit 33ab663

Please sign in to comment.