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: docs/content/get-started/module-bootstrap.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Scope the integration branch to exactly that core, not to everything planned for
20
20
21
21
1. Cut one long-lived branch from the default branch for the initial release, named for the outcome, e.g. `build-thing-module`.
22
22
2. Open one pull request per function (or small group of related functions) targeting that branch instead of `main`. These PRs can land in parallel — there is no strict order between them, unlike a [stacked pull request](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/#stacked-pull-requests).
23
-
3. Once the load-bearing core is coherent and complete, open the pull request that merges the integration branch into `main`. This becomes the module's first real release (`v1.0.0`).
23
+
3. Once the load-bearing core is coherent and complete, open the pull request that merges the integration branch into `main`. Its resulting important push becomes the module's first real release (`v1.0.0`).
24
24
4. Smaller follow-up features (one more function, a formatter, an alias) can keep targeting the integration branch before it lands, the same way they targeted it during bootstrap.
Copy file name to clipboardExpand all lines: docs/content/index.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,11 @@ An end-to-end PowerShell module pipeline that automates the entire lifecycle of
9
9
10
10
## How it works
11
11
12
-
The workflow is triggered on pull requests to the repository's default branch. When a pull request is opened, closed, reopened, synchronized (push), or labeled, the workflow runs. Depending on the labels on the pull request, the [workflow results in different outcomes](reference/scenario-matrix.md).
12
+
The caller workflow runs for pull-request lifecycle events and pushes to the repository's default branch. Open pull
13
+
requests run CI and can publish prereleases; closed pull requests clean up their prereleases. An important
14
+
default-branch push is the sole authority for a stable release. When that push is the exact merge commit of a pull
15
+
request, its labels and release notes supply the release metadata. See the
16
+
[scenario matrix](reference/scenario-matrix.md) for the resulting job execution.
13
17
14
18
Everything is packaged into a single reusable workflow so that a module repository only needs a small caller workflow and one settings file. A user configures the behaviour by editing `.github/PSModule.yml`.
15
19
@@ -23,7 +27,7 @@ New to Process-PSModule? Work through these in order.
23
27
| --- | --- |
24
28
|[Get started](get-started/index.md)| Create a module repository from the template and get the pipeline running. |
25
29
|[Repository setup](get-started/repository-setup.md)| Configure GitHub Pages, `PSGALLERY_API_KEY`, permissions, and the caller workflow. |
26
-
|[Your first release](get-started/your-first-release.md)| The pull request flow, version labels, and what happens on merge. |
30
+
|[Your first release](get-started/your-first-release.md)| The pull request flow, version labels, and the resulting default-branch release. |
27
31
28
32
## Guides
29
33
@@ -32,6 +36,7 @@ Task-oriented deep dives into the pipeline's functionality.
32
36
| Page | Description |
33
37
| --- | --- |
34
38
|[Calling the workflow](guides/calling-the-workflow.md)| The caller workflow, passing test secrets and variables with `TestData`, and important-file change detection. |
39
+
|[GitHub App authentication](guides/github-app-authentication.md)| Configure Shelly credentials and the scoped tokens used for repository API operations. |
35
40
|[Configuring the pipeline](guides/configuring-the-pipeline.md)| Worked examples for coverage targets, rapid testing, linting, and PR-based release notes. |
36
41
|[Structuring your module](guides/structuring-your-module.md)| The repository and module source layout the workflow expects, and how to declare dependencies. |
37
42
|[Writing module tests](guides/writing-module-tests.md)| Test discovery, setup and teardown phases, and shared test infrastructure. |
- An important default-branch push is the only stable-publication authority. A closed pull request performs
136
+
prerelease cleanup only.
135
137
- Publishes the artifact to the PowerShell Gallery exactly as built — no version mutation.
136
-
- Creates a GitHub Release using the version already stamped in the manifest.
138
+
- Creates a GitHub Release only after the Gallery publication succeeds, targeting the exact tested push SHA and using
139
+
the version already stamped in the manifest.
137
140
- 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.
138
141
-**Abandoned PR cleanup**: When a PR is closed without merging (abandoned), the workflow automatically cleans up any
139
142
prerelease versions and tags that were created for that PR. This ensures that abandoned work doesn't leave orphaned
Copy file name to clipboardExpand all lines: docs/content/reference/powershell-module-standard.md
+29-18Lines changed: 29 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,15 +111,20 @@ Keep related things together so the connection between code and its context is v
111
111
112
112
### Linear versioning
113
113
114
-
The release process treats each merged PR as a release on a single linear ancestry. There is no patching of older versions — security fixes go on the current tip of `main` only.
114
+
The release process treats each important default-branch push as a release on a single linear ancestry. A merged pull
115
+
request supplies release metadata when its merge commit exactly matches that push. There is no patching of older
116
+
versions — security fixes go on the current tip of `main` only.
115
117
116
118
### Release and feature branches
117
119
118
-
For large work, open a release branch and target it from feature branches. Apply the `Prerelease` label on the release branch PR to publish preview versions before the final merge to `main`.
120
+
For large work, open a release branch and target it from feature branches. Apply the `Prerelease` label on the release
121
+
branch PR to publish preview versions before its final merge creates the stable default-branch push.
119
122
120
123
## CI/CD pipeline
121
124
122
-
The [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow orchestrates the full lifecycle. Every PR triggers a **Plan** job that resolves configuration and version, then conditionally runs build, test, lint, and publish stages.
125
+
The [Process-PSModule](https://github.com/PSModule/Process-PSModule) workflow orchestrates the full lifecycle. Pull
126
+
requests and default-branch pushes trigger a **Plan** job that resolves configuration and version, then conditionally
127
+
runs build, test, lint, and publish stages.
123
128
124
129
### Pipeline stages
125
130
@@ -147,20 +152,20 @@ graph LR
147
152
148
153
| Stage | Runs on | Purpose |
149
154
| ----- | ------- | ------- |
150
-
|**Plan**| All events | Loads `.github/PSModule.yml`, resolves version from PR labels, produces the Settings JSON |
155
+
|**Plan**| All events | Loads `.github/PSModule.yml`, resolves the release context, produces the Settings JSON |
151
156
|**Lint-Repository**| Open/Updated PR | Runs super-linter on the full repo (Markdown, YAML, etc.) |
152
-
|**Lint-SourceCode**| Open/Updated PR, Merged PR, Manual| Runs PSScriptAnalyzer against `src/`|
153
-
|**Build-Module**| Open/Updated PR, Merged PR, Manual| Compiles source into a versioned module artifact |
154
-
|**Test-SourceCode**| Open/Updated PR, Merged PR, Manual| Framework tests on raw source files |
155
-
|**Test-Module**| Open/Updated PR, Merged PR, Manual| Pester tests against the built module artifact |
156
-
|**BeforeAll-ModuleLocal**| Open/Updated PR, Merged PR, Manual| Runs `tests/BeforeAll.ps1` once before the local test matrix |
157
-
|**Test-ModuleLocal**| Open/Updated PR, Merged PR, Manual| Pester tests with the module installed locally (cross-OS matrix) |
157
+
|**Lint-SourceCode**| Open/Updated PR, default-branch push/manual run| Runs PSScriptAnalyzer against `src/`|
158
+
|**Build-Module**| Open/Updated PR, default-branch push/manual run| Compiles source into a versioned module artifact |
159
+
|**Test-SourceCode**| Open/Updated PR, default-branch push/manual run| Framework tests on raw source files |
160
+
|**Test-Module**| Open/Updated PR, default-branch push/manual run| Pester tests against the built module artifact |
161
+
|**BeforeAll-ModuleLocal**| Open/Updated PR, default-branch push/manual run| Runs `tests/BeforeAll.ps1` once before the local test matrix |
162
+
|**Test-ModuleLocal**| Open/Updated PR, default-branch push/manual run| Pester tests with the module installed locally (cross-OS matrix) |
|**Get-TestResults**| Always (if Plan succeeded) | Aggregates and reports test results |
160
165
|**Get-CodeCoverage**| Always (if Plan succeeded) | Calculates and reports code coverage |
161
-
|**Publish-Module**|Merged PR (or Prerelease label)| Publishes to PowerShell Gallery and creates a GitHub Release|
162
-
|**Build-Docs / Build-Site**| Open/Updated PR, Merged PR, Manual| Generates documentation site from source |
163
-
|**Publish-Site**|Merged PR | Deploys documentation site to GitHub Pages |
166
+
|**Publish-Module**|Prerelease PR, stable default-branch push/manual run, or closed PR| Publishes a prerelease or stable release, or cleans up closed-PR prereleases|
167
+
|**Build-Docs / Build-Site**| Open/Updated PR, default-branch push/manual run| Generates documentation site from source |
168
+
|**Publish-Site**|Stable default-branch push/manual run | Deploys documentation site to GitHub Pages unless `Publish.Site.Skip` is set|
164
169
165
170
### Important file patterns
166
171
@@ -186,7 +191,7 @@ The **Plan** job resolves the next version before any build occurs. This means t
186
191
187
192
**Flow:**
188
193
189
-
1. `Get-PSModuleSettings` loads `.github/PSModule.yml` and determines `ReleaseType` from PR labels
194
+
1. `Get-PSModuleSettings` loads `.github/PSModule.yml` and determines `ReleaseType` from the normalized event context
190
195
2. `Resolve-PSModuleVersion` calculates the next semantic version from the latest Git tag
191
196
3. `Build-PSModule` stamps the resolved version into the compiled manifest
192
197
4. `Publish-PSModule` reads the version from the manifest (read-only) and publishes
@@ -203,6 +208,9 @@ The **Plan** job resolves the next version before any build occurs. This means t
203
208
204
209
**Prerelease versions:** Adding a `Prerelease` label to the PR produces a prerelease tag (e.g., `1.2.3-preview0001`). The format is controlled by `IncrementalPrerelease` (sequential numbering) or `DatePrereleaseFormat` (.NET DateTime format string).
205
210
211
+
An important direct default-branch push and a default-branch manual dispatch always resolve to `Patch`, regardless of
212
+
`AutoPatching`. A push that exactly matches a merged pull request uses that PR's version label instead.
213
+
206
214
**Tag format:** Releases are tagged with a configurable prefix (default `v`) — e.g., `v1.2.3`.
207
215
208
216
### Configuration (`.github/PSModule.yml`)
@@ -246,9 +254,11 @@ Test:
246
254
PercentTarget: 0
247
255
248
256
Publish:
257
+
Site:
258
+
Skip: false
249
259
Module:
250
260
Skip: false
251
-
AutoCleanup: true # Delete prerelease tags after stable release
261
+
AutoCleanup: true # Delete prerelease tags after stable release or PR closure
252
262
AutoPatching: true # Unlabeled PRs default to patch bump
0 commit comments