Skip to content

Commit e974072

Browse files
Document NuGet version range support for the Version input
1 parent ecde6a7 commit e974072

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To get started with your own GitHub PowerShell based action, [create a new repos
1818
| `KeyVaultKeyReference` | Log in using a GitHub App, with the App's Client ID and KeyVault Key Reference. | false | |
1919
| `Debug` | Enable debug output for the whole action. | false | `'false'` |
2020
| `Verbose` | Enable verbose output for the whole action. | false | `'false'` |
21-
| `Version` | Specifies the exact version of the GitHub module to install. | false | |
21+
| `Version` | The version or NuGet version range of the module to install. | false | |
2222
| `Prerelease` | Allow prerelease versions if available. | false | `'false'` |
2323
| `ErrorView` | Configure the PowerShell `$ErrorView` variable. You can use full names ('NormalView', 'CategoryView', 'ConciseView', 'DetailedView'). It matches on partials. | false | `'NormalView'` |
2424
| `ShowInfo` | Show information about the environment. | false | `'true'` |
@@ -28,6 +28,17 @@ To get started with your own GitHub PowerShell based action, [create a new repos
2828
| `WorkingDirectory` | The working directory where the script runs. | false | `'.'` |
2929
| `PreserveCredentials` | Preserve credentials after script execution. If false, disconnects GitHub contexts and CLI using Disconnect-GitHubAccount. | false | `'true'` |
3030

31+
> [!NOTE]
32+
> The `Version` input accepts an exact version or a [NuGet version range](https://learn.microsoft.com/nuget/concepts/package-versioning#version-ranges), the same syntax used by [`Install-PSResource`](https://learn.microsoft.com/powershell/module/microsoft.powershell.psresourceget/install-psresource). A bare version such as `1.2.3` is treated as an *exact* version rather than a minimum, so pinning a single version keeps working unchanged. A version that is already installed and satisfies the request is reused instead of being reinstalled.
33+
34+
| `Version` example | Meaning |
35+
|-------------------|-----------------------------------------|
36+
| `1.2.3` | Exactly `1.2.3` |
37+
| `[1.2.3]` | Exactly `1.2.3` |
38+
| `[1.2.0, ]` | `1.2.0` or newer |
39+
| `(, 2.0.0)` | Any version lower than `2.0.0` |
40+
| `[1.2.0, 2.0.0)` | `1.2.0` up to but not including `2.0.0` |
41+
3142
### Outputs
3243

3344
| Name | Description |

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inputs:
3535
required: false
3636
default: 'false'
3737
Version:
38-
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
38+
description: Specifies the version of the GitHub module to install. Accepts an exact version or a NuGet version range (for example '[1.2.0, 2.0.0)').
3939
required: false
4040
Prerelease:
4141
description: Allow prerelease versions if available.

0 commit comments

Comments
 (0)