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
Copy file name to clipboardExpand all lines: README.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,9 @@ Depending on the labels in the pull requests, the [workflow will result in diffe
43
43
-[How to get started](#how-to-get-started)
44
44
-[How it works](#how-it-works)
45
45
-[Workflow overview](#workflow-overview)
46
-
-[Get-Settings](#get-settings)
46
+
-[Plan](#plan)
47
47
-[Lint-Repository](#lint-repository)
48
-
-[Get settings](#get-settings-1)
48
+
-[Plan job](#plan-job)
49
49
-[Build module](#build-module)
50
50
-[Test source code](#test-source-code)
51
51
-[Lint source code](#lint-source-code)
@@ -106,20 +106,28 @@ Depending on the labels in the pull requests, the [workflow will result in diffe
106
106
-[Colocation of concerns](#colocation-of-concerns)
107
107
-[Compatibility](#compatibility)
108
108
109
-
### Get-Settings
109
+
### Plan
110
110
111
-
[workflow](./.github/workflows/Get-Settings.yml)
111
+
[workflow](./.github/workflows/Plan.yml)
112
+
113
+
The Plan job is the single decision point of the workflow. It runs two steps in sequence:
114
+
115
+
1.**Get-PSModuleSettings** — loads the settings file (`.github/PSModule.yml`) and emits a fully resolved `Settings` JSON object that every downstream job consumes.
116
+
2.**Resolve-PSModuleVersion** — calculates the next module version from the resolved settings and the labels on the current pull request. Emits `ModuleVersion`, `ModulePrerelease`, `ModuleFullVersion`, `ReleaseType`, and `CreateRelease` as job outputs.
117
+
118
+
The resolved version is passed into `Build-Module` so the manifest is stamped with the final version **before** the test stages run. The same artifact is then published unchanged by `Publish-Module`, which also uploads the zipped module as a GitHub Release asset. The bytes that are tested are the bytes that ship to the PowerShell Gallery and to GitHub Releases.
- Reads the settings file `github/PSModule.yml` in the module repository to configure the workflow.
126
+
[workflow](#plan)
127
+
- Reads the settings file `.github/PSModule.yml` in the module repository to configure the workflow.
121
128
- Gathers context for the process from GitHub and the repo files, configuring what tests to run, if and what kind of release to create, and whether
122
129
to setup testing infrastructure and what operating systems to run the tests on.
130
+
- Calculates the next module version from PR labels and existing releases, then publishes it as job outputs so Build-Module can stamp the manifest before the artifact is tested.
123
131
124
132
### Build module
125
133
@@ -317,6 +325,7 @@ The [PSModule - Module tests](./scripts/tests/Module/PSModule/PSModule.Tests.ps1
- Attaches the built module as a `.zip` asset on the GitHub Release so consumers can download the exact bytes that were tested and pushed to the PowerShell Gallery.
320
329
-**Abandoned PR cleanup**: When a PR is closed without merging (abandoned), the workflow automatically cleans up any
321
330
prerelease versions and tags that were created for that PR. This ensures that abandoned work doesn't leave orphaned
322
331
prereleases in the PowerShell Gallery or repository. This behavior is controlled by the `Publish.Module.AutoCleanup`
@@ -430,7 +439,7 @@ This table shows when each job runs based on the trigger scenario:
0 commit comments