Skip to content

setup PowerShell action

Actions
downloads and unpacks PowerShell (pwsh) for gh actions
v1
Latest
Star (4)

Build and Test

Setup PowerShell (pwsh)

This action downloads, unpacks, and configures PowerShell (pwsh) for use in GitHub Actions workflows. PowerShell is a powerful scripting language and shell developed by Microsoft. PowerShell is unpacked under the temporary directory of a runner.

Usage

- uses: milliewalky/setup-pwsh@v1
  with:
    # PowerShell release tag from its GitHub Releases page e.g. v7.5.0.
    # default: latest
    tag: ""

This action appends PowerShell to a temporary PATH file, thereby selecting a shell in a subsequent step of your defined action.yml file after setting up PowerShell should result in PowerShell becoming available in a somewhat native fashion, given how shells are handled by GitHub Actions runners.

- name: peek PowerShell version
  shell: pwsh
  run: $PSVersionTable.PSVersion

Thus, this works.

License

The scripts and documentation in this project are released under the MIT License

setup PowerShell action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

downloads and unpacks PowerShell (pwsh) for gh actions
v1
Latest

setup PowerShell action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.