The action runs PowerShell scripts that depend on the GitHub PowerShell module, and workflow authors choose which version of that module is installed through the Version input. Today the Version input accepts only a single exact version — its description states the value "must be an exact version."
Request
Desired capability
The Version input should accept a NuGet version range in addition to a plain exact version — the same syntax that PSResourceGet already uses. Workflow authors could then express an acceptable window instead of pinning a single build, for example:
| Intent |
Value |
| Exact version (unchanged) |
1.2.3 |
| Exact match |
[1.2.3] |
| Minimum, inclusive |
[1.2.0, ] |
| Maximum, exclusive |
(, 2.0.0) |
| Bounded window |
[1.2.0, 2.0.0) |
This matters because the current model forces a choice between hardcoding one exact version — which never picks up compatible fixes — and omitting Version entirely, which always installs the latest with no floor or ceiling. A range lets a workflow accept compatible updates automatically while still guarding against an unwanted major bump. It also aligns the action with the direction of PSResourceGet, whose cmdlets already resolve versions using this notation.
Acceptance criteria
Technical decisions
The installer already speaks this syntax. src/init.ps1 already installs the module with Install-PSResource, whose -Version parameter accepts an exact version or a NuGet version range. The work is to expose and document that capability and to correct the already-installed check — not to swap the installer.
Pass the value through; do not build a custom parser. The Version input is forwarded verbatim to Install-PSResource -Version. PSResourceGet validates the syntax and resolves the range, so the action does not implement its own range parsing or validation.
A bare version stays exact — this is not a breaking change. Per the -Version documentation, PSResourceGet treats a bare version such as 1.2.3 as the required (exact) version, not "minimum inclusive". Existing consumers keep identical behavior, so the change is purely additive. A minimum-inclusive range must be written [1.2.3, ].
Fix the already-installed check. The current logic in src/init.ps1 filters installed resources with Get-InstalledPSResource -Name $Name | Where-Object Version -EQ $Version. String equality never matches a range such as [1.2.0, 2.0.0), so a range would force a reinstall on every run. Replace it with Get-InstalledPSResource -Name $Name -Version $Version: Get-InstalledPSResource accepts the same NuGet range syntax and returns the installed versions that satisfy the range, delegating satisfaction to PSResourceGet and keeping detection consistent with installation.
Prerelease remains a separate switch. Install-PSResource keeps -Prerelease as a distinct switch rather than encoding prerelease acceptance in the version string, so the existing Prerelease boolean input is retained and passed through. It composes with the range: a prerelease is only considered when Prerelease is true, matching PSResourceGet semantics where a prerelease sorts below its stable counterpart within a range.
Scope. Only the Version input semantics and description and the already-installed check change. No new inputs are added, and Prerelease behavior is unchanged.
Implementation plan
Core changes
Documentation
Tests
The action runs PowerShell scripts that depend on the GitHub PowerShell module, and workflow authors choose which version of that module is installed through the
Versioninput. Today theVersioninput accepts only a single exact version — its description states the value "must be an exact version."Request
Desired capability
The
Versioninput should accept a NuGet version range in addition to a plain exact version — the same syntax that PSResourceGet already uses. Workflow authors could then express an acceptable window instead of pinning a single build, for example:1.2.3[1.2.3][1.2.0, ](, 2.0.0)[1.2.0, 2.0.0)This matters because the current model forces a choice between hardcoding one exact version — which never picks up compatible fixes — and omitting
Versionentirely, which always installs the latest with no floor or ceiling. A range lets a workflow accept compatible updates automatically while still guarding against an unwanted major bump. It also aligns the action with the direction of PSResourceGet, whose cmdlets already resolve versions using this notation.Acceptance criteria
Versioninput accepts NuGet version range notation as well as a plain exact version.1.2.3) install exactly that version — no behavior change.Technical decisions
The installer already speaks this syntax.
src/init.ps1already installs the module withInstall-PSResource, whose-Versionparameter accepts an exact version or a NuGet version range. The work is to expose and document that capability and to correct the already-installed check — not to swap the installer.Pass the value through; do not build a custom parser. The
Versioninput is forwarded verbatim toInstall-PSResource -Version. PSResourceGet validates the syntax and resolves the range, so the action does not implement its own range parsing or validation.A bare version stays exact — this is not a breaking change. Per the
-Versiondocumentation, PSResourceGet treats a bare version such as1.2.3as the required (exact) version, not "minimum inclusive". Existing consumers keep identical behavior, so the change is purely additive. A minimum-inclusive range must be written[1.2.3, ].Fix the already-installed check. The current logic in
src/init.ps1filters installed resources withGet-InstalledPSResource -Name $Name | Where-Object Version -EQ $Version. String equality never matches a range such as[1.2.0, 2.0.0), so a range would force a reinstall on every run. Replace it withGet-InstalledPSResource -Name $Name -Version $Version:Get-InstalledPSResourceaccepts the same NuGet range syntax and returns the installed versions that satisfy the range, delegating satisfaction to PSResourceGet and keeping detection consistent with installation.Prerelease remains a separate switch.
Install-PSResourcekeeps-Prereleaseas a distinct switch rather than encoding prerelease acceptance in the version string, so the existingPrereleaseboolean input is retained and passed through. It composes with the range: a prerelease is only considered whenPrereleaseistrue, matching PSResourceGet semantics where a prerelease sorts below its stable counterpart within a range.Scope. Only the
Versioninput semantics and description and the already-installed check change. No new inputs are added, andPrereleasebehavior is unchanged.Implementation plan
Core changes
Versioninput description inaction.ymlfrom "must be an exact version" to "an exact version or a NuGet version range".src/init.ps1, replace theWhere-Object Version -EQ $Versionalready-installed filter withGet-InstalledPSResource -Name $Name -Version $Versionso installed-version detection honors ranges.Versionvalue is forwarded unchanged toInstall-PSResource -Versionand that the$moduleStatus"Version" display reads sensibly when a range is supplied.Prereleaseinput still composes correctly with a version range.Documentation
Versionrow in the README inputs table and add examples for exact (1.2.3), exact-match ([1.2.3]), minimum-inclusive ([1.2.0, ]), maximum-exclusive ((, 2.0.0)), and bounded ([1.2.0, 2.0.0)) notations.Tests
.github/workflows/TestWorkflow.yml) exercising exact version, minimum-inclusive range, bounded range, and noVersion(latest)..github/workflows/Action-Test-Prerelease.yml.