You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Prerelease input for latest prerelease resolution
- Add 'Prerelease' boolean input (default: false), similar to
Install-PSResource's -Prerelease switch
- When Prerelease is true and Version is 'latest', resolve to the latest
prerelease from the PowerShell/PowerShell GitHub releases API
- Explicit prerelease version strings (e.g. 7.6.0-preview.6) continue to
work directly without the Prerelease flag
- Add prerelease resolution to all 3 platform steps (Linux bash, macOS
bash, Windows PowerShell 5.1)
- Update test workflow with 'prerelease' matrix entry
- Update README with Prerelease input docs and latest prerelease example
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,11 +35,21 @@ jobs:
35
35
Version: 7.6.0-preview.6
36
36
```
37
37
38
+
### Installing the latest prerelease
39
+
40
+
```yaml
41
+
- name: Install latest PowerShell Preview
42
+
uses: PSModule/install-powershell@v1
43
+
with:
44
+
Prerelease: true
45
+
```
46
+
38
47
## Inputs
39
48
40
49
| Input | Required | Default | Description |
41
50
| ----- | -------- | ------- | ----------- |
42
-
| `Version` | `false` | `latest` | Desired PowerShell Core version (e.g. `7.4.1`, `7.6.0-preview.6`). Use `latest` to install the newest stable release. Prerelease versions are supported. |
51
+
| `Version` | `false` | `latest` | Desired PowerShell Core version (e.g. `7.4.1`, `7.6.0-preview.6`). Use `latest` to install the newest stable release (or newest prerelease when `Prerelease` is `true`). |
52
+
| `Prerelease` | `false` | `false` | Install a prerelease version. When `true` and `Version` is `latest`, resolves to the latest prerelease. Similar to `-Prerelease` on `Install-PSResource`. |
43
53
44
54
## Secrets
45
55
@@ -53,8 +63,8 @@ This action does **not** generate any outputs.
53
63
54
64
* **Version resolution**
55
65
If `Version` is set to `latest` (case‑insensitive), the action queries the GitHub API for the newest stable release tag in the
56
-
`PowerShell/PowerShell`repository and substitutes that version. Prerelease version strings (e.g. `7.6.0-preview.6`) are passed
57
-
through directly.
66
+
`PowerShell/PowerShell`repository and substitutes that version. When `Prerelease` is `true`, it queries for the latest prerelease
67
+
instead. Explicit prerelease version strings (e.g. `7.6.0-preview.6`) are passed through directly.
58
68
59
69
* **Skip logic**
60
70
Before installing, the action checks the current runner to see whether the requested version is already available
0 commit comments