Releases: PSModule/Install-PowerShell
v1.1.0
🚀 [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.
- Fixes #15
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: trueInstalling a specific prerelease version
- uses: PSModule/Install-PowerShell@v1
with:
Version: 7.4.0-preview.5Linux 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-ltsinstead ofpowershell) - Removes all existing PowerShell packages before installing to avoid
dpkgconflicts 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
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
- Update README to include Node.js 24 support details and requirements by
@salmanmkcin actions/checkout#2248- Persist creds to a separate file by
@ericsciplein actions/checkout#2286- v6-beta by
@ericsciplein actions/checkout#2298- update readme/changelog for v6 by
@ericsciplein actions/checkout#2311Full Changelog: actions/checkout@v5.0.0...v6.0.0
v6-beta
What's Changed
Updated persist-credentials to store the credentials under
$RUNNER_TEMPinstead 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
- Port v6 cleanup to v5 by
@ericsciplein actions/checkout#2301Full Changelog: actions/checkout@v5...v5.0.1
Changelog
Sourced from actions/checkout's changelog.
Changelog
V6.0.0
- Persist creds to a separate file by
@ericsciplein actions/checkout#2286- Update README to include Node.js 24 support details and requirements by
@salmanmkcin actions/checkout#2248V5.0.1
- Port v6 cleanup to v5 by
@ericsciplein actions/checkout#2301V5.0.0
- Update actions checkout to use node 24 by
@salmanmkcin actions/checkout#2226V4.3.1
- Port v6 cleanup to v4 by
@ericsciplein actions/checkout#2305V4.3.0
- docs: update README.md by
@motssin actions/checkout#1971- Add internal repos for checking out multiple repositories by
@mouismailin actions/checkout#1977- Documentation update - add recommended permissions to Readme by
@benwellsin actions/checkout#2043- Adjust positioning of user email note and permissions heading by
@joshmgrossin actions/checkout#2044- Update README.md by
@nebuk89in actions/checkout#2194- Update CODEOWNERS for actions by
@TingluoHuangin actions/checkout#2224- Update package dependencies by
@salmanmkcin actions/checkout#2236v4.2.2
url-helper.tsnow leverages well-known environment variables by@jww3in actions/checkout#1941- Expand unit test coverage for
isGhesby@jww3in actions/checkout#1946v4.2.1
- Check out other refs/* by commit if provided, fall back to ref by
@orhantoyin actions/checkout#1924v4.2.0
- Add Ref and Commit outputs by
@lucacomein actions/checkout#1180- Dependency updates by
@dependabot- actions/checkout#1777, actions/checkout#1872v4.1.7
- Bump the minor-npm-dependencies group across 1 directory with 4 updates by
@dependabotin actions/checkout#1739- Bump actions/checkout from 3 to 4 by
@dependabotin actions/checkout#1697- Check out other refs/* by commit by
@orhantoyin actions/checkout#1774- Pin actions/checkout's own workflows to a known, good, stable version. by
@jww3in actions/checkout#1776v4.1.6
- Check platform to set archive extension appropriately by
@cory-millerin actions/checkout#1732v4.1.5
- Update NPM dependencies by
@cory-millerin actions/checkout#1703- Bump github/codeql-action from 2 to 3 by
@dependabotin actions/checkout#1694- Bump actions/setup-node from 1 to 4 by
@dependabotin actions/checkout#1696- Bump actions/upload-artifact from 2 to 4 by
@dependabotin actions/checkout#1695
... (truncated)
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-de...
v1.0.4
🩹 [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: Addeddependenciesandgithub-actionslabels to Dependabot PRs for GitHub Actions updates.
v1.0.3
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
- Update actions checkout to use node 24 by
@salmanmkcin actions/checkout#2226- Prepare v5.0.0 release by
@salmanmkcin actions/checkout#2238
⚠️ Minimum Compatible Runner Versionv2.327.1
Release NotesMake 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
- docs: update README.md by
@motssin actions/checkout#1971- Add internal repos for checking out multiple repositories by
@mouismailin actions/checkout#1977- Documentation update - add recommended permissions to Readme by
@benwellsin actions/checkout#2043- Adjust positioning of user email note and permissions heading by
@joshmgrossin actions/checkout#2044- Update README.md by
@nebuk89in actions/checkout#2194- Update CODEOWNERS for actions by
@TingluoHuangin actions/checkout#2224- Update package dependencies by
@salmanmkcin actions/checkout#2236- Prepare release v4.3.0 by
@salmanmkcin actions/checkout#2237New Contributors
@motssmade their first contribution in actions/checkout#1971@mouismailmade their first contribution in actions/checkout#1977@benwellsmade their first contribution in actions/checkout#2043@nebuk89made their first contribution in actions/checkout#2194@salmanmkcmade their first contribution in actions/checkout#2236Full Changelog: actions/checkout@v4...v4.3.0
v4.2.2
What's Changed
url-helper.tsnow leverages well-known environment variables by@jww3in actions/checkout#1941- Expand unit test coverage for
isGhesby@jww3in actions/checkout#1946Full Changelog: actions/checkout@v4.2.1...v4.2.2
v4.2.1
What's Changed
- Check out other refs/* by commit if provided, fall back to ref by
@orhantoyin actions/checkout#1924New Contributors
@Jcambassmade their first contribution in actions/checkout#1919Full Changelog: actions/checkout@v4.2.0...v4.2.1
... (truncated)
Changelog
Sourced from actions/checkout's changelog.
Changelog
V5.0.0
- Update actions checkout to use node 24 by
@salmanmkcin actions/checkout#2226V4.3.0
- docs: update README.md by
@motssin actions/checkout#1971- Add internal repos for checking out multiple repositories by
@mouismailin actions/checkout#1977- Documentation update - add recommended permissions to Readme by
@benwellsin actions/checkout#2043- Adjust positioning of user email note and permissions heading by
@joshmgrossin actions/checkout#2044- Update README.md by
@nebuk89in actions/checkout#2194- Update CODEOWNERS for actions by
@TingluoHuangin actions/checkout#2224- Update package dependencies by
@salmanmkcin actions/checkout#2236v4.2.2
url-helper.tsnow leverages well-known environment variables by@jww3in actions/checkout#1941- Expand unit test coverage for
isGhesby@jww3in actions/checkout#1946v4.2.1
- Check out other refs/* by commit if provided, fall back to ref by
@orhantoyin actions/checkout#1924v4.2.0
- Add Ref and Commit outputs by
@lucacomein actions/checkout#1180- Dependency updates by
@dependabot- actions/checkout#1777, actions/checkout#1872v4.1.7
- Bump the minor-npm-dependencies group across 1 directory with 4 updates by
@dependabotin actions/checkout#1739- Bump actions/checkout from 3 to 4 by
@dependabotin actions/checkout#1697- Check out other refs/* by commit by
@orhantoyin actions/checkout#1774- Pin actions/checkout's own workflows to a known, good, stable version. by
@jww3in actions/checkout#1776v4.1.6
- Check platform to set archive extension appropriately by
@cory-millerin actions/checkout#1732v4.1.5
- Update NPM dependencies...
v1.0.2
🩹 [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
🩹 [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 (
.debor.rpm). - Enhanced error handling for unsupported Linux distributions.
- 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 (
- 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
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.ymlto reflect the new functionality, including a description, branding changes, and streamlined inputs. Removed unnecessary inputs likeDebugandVerbose.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