Skip to content

Releases: PSModule/Install-PowerShell

v1.1.0

17 Feb 11:58
fae8569

Choose a tag to compare

🚀 [Feature]: Support installing prerelease PowerShell versions (#16)

The action now supports installing prerelease PowerShell versions (e.g. 7.4.0-preview.5, 7.5.0-rc.1) on all platforms. You can install a specific prerelease version by passing the full version string, or install the latest prerelease by setting the new Prerelease input to true.

New Prerelease input

A new Prerelease boolean input has been added, following the same UX pattern as Install-PSResource -Prerelease. When set to true and Version is latest, the action resolves to the latest prerelease from the PowerShell/PowerShell GitHub releases.

Usage Version Prerelease Result
Latest stable latest (default) false (default) Resolves to latest stable via /releases/latest
Latest prerelease latest true Resolves to latest prerelease via /releases API
Specific stable 7.5.0 Installs 7.5.0 directly
Specific prerelease 7.4.0-preview.5 Installs 7.4.0-preview.5 directly (no flag needed)

Installing the latest prerelease

- uses: PSModule/Install-PowerShell@v1
  with:
    Prerelease: true

Installing a specific prerelease version

- uses: PSModule/Install-PowerShell@v1
  with:
    Version: 7.4.0-preview.5

Linux package conflict handling

On Linux, the PowerShell project publishes multiple .deb variants (powershell, powershell-lts, powershell-preview) that all provide /usr/bin/pwsh and conflict with each other. The action now:

  • Uses specific asset name filters (powershell_ for stable, powershell-preview_ for prerelease) instead of a broad regex that could match the wrong package variant (e.g. powershell-lts instead of powershell)
  • Removes all existing PowerShell packages before installing to avoid dpkg conflicts when switching versions
  • Verifies the installed version matches the requested version after install, failing early with a clear error if not
  • Applies the same fixes for RPM-based distributions

Windows prerelease handling

On Windows, preview builds install to $env:ProgramFiles\PowerShell\7-preview\ instead of $env:ProgramFiles\PowerShell\7\. The action now correctly handles:

  • Downgrade detection by stripping the prerelease suffix before [version] comparison (Windows PowerShell 5.1 lacks [semver])
  • Uninstall registry filtering to match Preview display names when the current version is a preview
  • Cross-prerelease version changes (same base version, different label) by forcing an uninstall-then-install cycle

PATH management

After installation, the action adds the PowerShell install directory to GITHUB_PATH on all platforms. This ensures subsequent workflow steps using shell: pwsh resolve to the newly installed version — including preview builds whose install directory is not on the runner's default PATH.

v1.0.5

26 Nov 20:28
d86976e

Choose a tag to compare

Bump actions/checkout from 5 to 6 (#7)

Bumps actions/checkout from 5 to 6.

Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: actions/checkout@v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: actions/checkout@v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[Dependabot compatibility score](https://docs.github.com/en/github/managing-security-vulnerabilities/about-de...

Read more

v1.0.4

05 Oct 10:24
3eb81fd

Choose a tag to compare

🩹 [Patch]: Update Dependabot configuration to include labels for GitHub Actions (#6)

Description

This pull request makes a small configuration improvement by adding default labels to Dependabot pull requests for GitHub Actions. This will help categorize and filter these PRs more easily in the repository.

  • .github/dependabot.yml: Added dependencies and github-actions labels to Dependabot PRs for GitHub Actions updates.

v1.0.3

27 Aug 11:55
f68b9ce

Choose a tag to compare

Bump actions/checkout from 4 to 5 (#5)

Bumps actions/checkout from 4 to 5.

Release notes

Sourced from actions/checkout's releases.

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: actions/checkout@v4...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: actions/checkout@v4...v4.3.0

v4.2.2

What's Changed

Full Changelog: actions/checkout@v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: actions/checkout@v4.2.0...v4.2.1

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

V5.0.0

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

  • Update NPM dependencies...
Read more

v1.0.2

14 Jun 22:08
7da1f59

Choose a tag to compare

🩹 [Patch]: Fix Windows PowerShell downgrade installation (#4)

This pull request refines the PowerShell installation process on Windows based GitHub runners.

  • Fixes #3

Windows-Specific Enhancements:

  • Added detection for currently installed PowerShell versions and introduced logic to handle downgrades, including uninstalling existing versions if necessary.
  • Improved uninstall command handling for MSI-based PowerShell installations by ensuring quiet and no-restart flags are added.

v1.0.1

26 Apr 13:15
0605bcb

Choose a tag to compare

🩹 [Patch]: Get package from GitHub release for Linux and macOS

This release updates the PowerShell installation process to streamline installation logic for different operating systems, using the GitHub releases on the PowerShell repository as source.

Improvements to installation logic

  • Linux installation process:
    • Replaced APT-specific logic with a more generic approach to support both Debian/Ubuntu and RHEL/Fedora/CentOS distributions. Added architecture detection to determine the appropriate package format (.deb or .rpm).
    • Enhanced error handling for unsupported Linux distributions.
  • macOS installation process:
    • Simplified version resolution logic for case-insensitive matching of the "latest" keyword.
    • Improved architecture detection and package download logic for macOS.
  • Windows installation process:
    • Added better logging for detected and requested versions. Improved error handling for download failures.

Enhancements to logging

  • Added logs to display the currently installed PowerShell version or indicate if it is not installed. This applies to all platforms (Linux, macOS, and Windows).
  • Included messages for successful installations and download URLs for better traceability.

Code consistency and maintainability

  • Introduced working-directory: ${{ github.action_path }} for all steps to ensure consistent execution paths.
  • Removed redundant or outdated logic, such as Homebrew-specific handling on macOS and APT-specific handling on Linux, in favor of a unified approach.

v1.0.0

21 Apr 11:02
09d87d3

Choose a tag to compare

Description

This pull request introduces the Install-PowerShell GitHub Action, simplifying installation of specific versions of PowerShell on GitHub runners.

Features:

  • Cross‑platform installer – Runs on all GitHub‑hosted runners (Ubuntu, macOS, Windows). Detects the OS at runtime and executes the appropriate installation routine.
  • Version selector – Installs either a specific PowerShell Core version (e.g. 7.4.1) or the latest stable release when Version: latest is supplied (default).
  • Smart skip logic – Checks the currently installed PowerShell version and skips installation when the requested version is already present, saving time and CI minutes.
  • Native package managers first
    • Linux (Debian/Ubuntu): Uses APT, falling back to direct .deb download if the exact version isn’t in the repo.
    • macOS: Prefers Homebrew Cask; falls back to the official .pkg installer (ARM64/x64 aware).
    • Windows: Downloads the official MSI and installs silently with msiexec.

Metadata Updates:

  • Action Metadata Update: Updated action.yml to reflect the new functionality, including a description, branding changes, and streamlined inputs. Removed unnecessary inputs like Debug and Verbose. action.yml

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas