Skip to content

Commit 1af923a

Browse files
docs(readme): enhance clarity and structure by updating instructions and rephrasing sections
1 parent af18391 commit 1af923a

File tree

1 file changed

+62
-56
lines changed

1 file changed

+62
-56
lines changed

README.md

Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ minimal setup.
1111
4. [Create a PowerShell Gallery API key](https://www.powershellgallery.com/account/apikeys) with publish rights.
1212
5. Add a repository secret named `APIKEY` containing your gallery key.
1313
6. Develop on a feature branch, open a pull request, and let Process-PSModule validate your changes.
14+
7. Optionally label the PR to control version bumping. The default being a patch bump, but add a label called `minor` or `major` to bump the version
15+
accordingly.
16+
8. Merge the PR to trigger publishing: the built module is published to PowerShell Gallery and documentation is deployed to GitHub Pages.
1417

1518
## What you get
1619

17-
- One workflow run manages build, validation, documentation, and publishing across Linux, macOS, and Windows.
20+
- One workflow run manages build, validation across Linux, macOS, and Windows, documentation, and publishing the module and documentation.
1821
- Dynamic behavior driven by repository metadata, GitHub event context, and settings via `.github/PSModule.yml`.
1922
- Consistent artifacts, logs, and gating so every environment observes the same result.
2023
- Label-driven version bumping: patch (default), minor (`minor`, `feature`), or major (`major`, `breaking`).
@@ -33,36 +36,35 @@ and PR labels.
3336

3437
1. **Discover and plan** — Reads `.github/PSModule.yml` (YAML, JSON, or PSD1), inspects labels and event payloads,
3538
determines target operating systems, quality gates, and whether publishing is in scope.
36-
2. **Build and document**Stages `src/` tree, honors `*build.ps1` hooks, composes root module, regenerates manifest,
37-
and generates documentation from staged output.
38-
3. **Validate quality** — Executes source linting, module framework validation, and repository-specific tests against
39+
2. **Build and document**Builds a module from the `src/` tree, runs `*build.ps1` scripts, composes root module, generates the +manifest,
40+
and generates documentation based on the built module.
41+
3. **Validate quality** — Executes linting, module framework validation, and repository-specific tests against
3942
staged module. Optional `tests/BeforeAll.ps1` and `tests/AfterAll.ps1` scripts handle shared setup and teardown.
4043
4. **Publish and close out** — Promotes staged module to PowerShell Gallery, creates GitHub release, deploys
4144
documentation to Pages, and cleans up abandoned prereleases when configured.
4245

4346
**Job lifecycle across GitHub events:**
4447

45-
| Job | Open/updated PR | Merged PR | Abandoned PR | Manual run |
46-
|---------------------------|-----------------|-----------|--------------|------------|
47-
| Gather repo settings | ✅ Always | ✅ Always | ✅ Always | ✅ Always |
48-
| Repository lint | ✅ Yes | ❌ No | ❌ No | ❌ No |
49-
| Module build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
50-
| Documentation build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
51-
| Site build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
52-
| Source lint | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
53-
| Framework tests | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
54-
| Module-local tests | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
55-
| Module-local cleanup | ✅ Yes | ✅ Yes | ✅ Yes* | ✅ Yes |
56-
| Results aggregation | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
57-
| Coverage summary | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
58-
| Site publish | ❌ No | ✅ Yes | ❌ No | ❌ No |
59-
| Module publish | ✅ Yes** | ✅ Yes** | ✅ Yes*** | ✅ Yes** |
48+
| Job | Open/updated PR | Merged PR | Abandoned PR | Manual run |
49+
|-|-|-|-|-|
50+
| Get settings | ✅ Always | ✅ Always | ✅ Always | ✅ Always |
51+
| Repository lint | ✅ Yes | ❌ No | ❌ No | ❌ No |
52+
| Module build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
53+
| Documentation build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
54+
| Site build | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
55+
| Source lint | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
56+
| Framework tests | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
57+
| Module-local tests | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
58+
| Module-local cleanup| ✅ Yes | ✅ Yes | ✅ Yes* | ✅ Yes |
59+
| Results aggregation | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
60+
| Coverage summary | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes |
61+
| Site publish | ❌ No | ✅ Yes | ❌ No | ❌ No |
62+
| Module publish | ✅ Yes** | ✅ Yes** | ✅ Yes*** | ✅ Yes** |
6063

6164
\* Runs cleanup only if tests were started.
6265
\*\* Only when build, test, and coverage gates succeed.
6366
\*\*\* Publishes cleanup or retraction version when required.
6467

65-
6668
## Configuration
6769

6870
Control workflow behavior through `.github/PSModule.yml` (or `.json` / `.psd1`). The workflow reads this file to
@@ -78,7 +80,7 @@ Test:
7880
```
7981
8082
```yaml
81-
# Fast Linux-only validation (skip macOS/Windows, disable coverage)
83+
# Fast Linux-only validation (skip macOS/Windows, disable test summary)
8284
Test:
8385
SourceCode:
8486
Skip: true
@@ -96,6 +98,8 @@ Test:
9698
Build:
9799
Docs:
98100
Skip: true
101+
Linter:
102+
Skip: true
99103
```
100104
101105
```yaml
@@ -264,81 +268,79 @@ Publish:
264268

265269
## Repository layout
266270

267-
Process-PSModule expects repositories to follow the staged layout produced by
268-
[Template-PSModule](https://github.com/PSModule/Template-PSModule). The workflow inspects this structure to decide what
269-
to compile, document, and publish.
271+
Process-PSModule expects repositories to follow the staged layout produced by [Template-PSModule](https://github.com/PSModule/Template-PSModule).
272+
The workflow inspects this structure to decide what to compile, document, and publish.
270273

271274
```plaintext
272275
<ModuleName>/
273276
├── .github/
274-
│ ├── linters/
275-
│ │ ├── .markdown-lint.yml # Markdown rules enforced via super-linter
276-
│ │ ├── .powershell-psscriptanalyzer.psd1 # Analyzer profile for test jobs
277-
│ │ └── .textlintrc # Text lint rules surfaced in build docs summaries
277+
│ ├── linters/ # Linter configurations, align with super-linter
278+
│ │ ├── .markdown-lint.yml # Markdown rules
279+
│ │ ├── .powershell-psscriptanalyzer.psd1 # PSScriptAnalyzer rules
280+
│ │ └── .textlintrc # Text lint rules
278281
│ ├── workflows/
279282
│ │ └── Process-PSModule.yml # Entry point for this reusable workflow
280283
│ ├── CODEOWNERS # Default reviewers enforced by Process-PSModule checks
281-
│ ├── dependabot.yml # Dependency update cadence
284+
│ ├── dependabot.yml # Dependabot settings
282285
│ ├── mkdocs.yml # MkDocs config consumed during site builds
283-
│ ├── PSModule.yml # Settings parsed to drive matrices
284-
│ └── release.yml # Release automation template invoked on publish
286+
│ ├── PSModule.yml # Settings used by the Process-PSModule.yml workflow
287+
│ └── release.yml # Release template when making GitHub releases
285288
├── examples/
286289
│ └── General.ps1 # Example script ingested by Document-PSModule
287290
├── icon/
288-
│ └── icon.png # Default module icon (PNG format)
291+
│ └── icon.png # The icon automatically used in the manifest
289292
├── src/
290293
│ ├── assemblies/ # Bundled binaries copied into build artifact
291-
│ ├── classes/
294+
│ ├── classes/ # Classes and enums added to the module
292295
│ │ ├── private/ # Internal classes kept out of exports
293296
│ │ │ └── SecretWriter.ps1
294297
│ │ └── public/ # Public classes exported via type accelerators
295298
│ │ └── Book.ps1
296299
│ ├── data/ # Configuration loaded into $script: scope at runtime
297-
│ │ ├── Config.psd1
298-
│ │ └── Settings.psd1
299-
│ ├── formats/ # Formatting metadata registered during build
300+
│ │ ├── Config.psd1 # Example: $script:Config - module internal variable
301+
│ │ └── Settings.psd1 # Example: $script:Settings - module internal variable
302+
│ ├── formats/ # View formats, added to the manifest as 'FormatsToProcess'
300303
│ │ ├── CultureInfo.Format.ps1xml
301304
│ │ └── Mygciview.Format.ps1xml
302-
│ ├── functions/
305+
│ ├── functions/ # Functions added to the module
303306
│ │ ├── private/ # Helper functions scoped to the module
304307
│ │ │ ├── Get-InternalPSModule.ps1
305308
│ │ │ └── Set-InternalPSModule.ps1
306-
│ │ └── public/ # Public commands documented and tested
307-
│ │ ├── Category/ # Optional: organize commands into categories
309+
│ │ └── public/ # Functions that are documented, tested and exported
310+
│ │ ├── Category/ # Optional: organize commands into folders. Docs mirror structure.
308311
│ │ │ ├── Get-CategoryCommand.ps1
309-
│ │ │ └── Category.md # Category overview merged into docs output
312+
│ │ │ └── Category.md # Markdown docs are added to the documentation
310313
│ │ ├── Get-PSModuleTest.ps1
311314
│ │ ├── New-PSModuleTest.ps1
312315
│ │ ├── Set-PSModuleTest.ps1
313316
│ │ └── Test-PSModuleTest.ps1
314-
│ ├── init/ # Initialization scripts executed during module load
317+
│ ├── init/ # Initialization scripts executed during module load, run in module context
315318
│ │ └── initializer.ps1
316319
│ ├── modules/ # Nested modules packaged with compiled output
317320
│ │ └── OtherPSModule.psm1
318-
│ ├── scripts/ # Scripts listed in 'ScriptsToProcess'
321+
│ ├── scripts/ # Scripts listed in 'ScriptsToProcess', run in user context
319322
│ │ └── loader.ps1
320-
│ ├── types/ # Type data merged into manifest
323+
│ ├── types/ # Type extensions, added to the manifest as 'TypesToProcess'
321324
│ │ ├── DirectoryInfo.Types.ps1xml
322325
│ │ └── FileInfo.Types.ps1xml
323-
│ ├── variables/
324-
│ │ ├── private/ # Internal variables scoped to the module
326+
│ ├── variables/ # Module-level variables
327+
│ │ ├── private/ # Variables scoped to the module, not exported
325328
│ │ │ └── PrivateVariables.ps1
326-
│ │ └── public/ # Public variables exported and documented
329+
│ │ └── public/ # Variables that are exported to the user context
327330
│ │ ├── Moons.ps1
328331
│ │ ├── Planets.ps1
329332
│ │ └── SolarSystems.ps1
330-
│ ├── finally.ps1 # Cleanup script appended to root module
331-
│ ├── header.ps1 # Optional header injected at top of module
332-
│ ├── manifest.psd1 # (Optional) Source manifest reused when present
333-
│ └── README.md # Module-level docs ingested by Document-PSModule
333+
│ ├── finally.ps1 # Script added at the end of the root module
334+
│ ├── header.ps1 # Script added at the start of the root module
335+
│ └── manifest.psd1 # If present, a manifest that is reused when building the module
334336
├── tests/
335-
│ ├── AfterAll.ps1 # (Optional) Cleanup script for module-local runs
336-
│ ├── BeforeAll.ps1 # (Optional) Setup script for module-local runs
337-
│ └── <ModuleName>.Tests.ps1 # Primary test entry point
337+
│ ├── AfterAll.ps1 # Cleanup script for module-local runs
338+
│ ├── BeforeAll.ps1 # Setup script for module-local runs
339+
│ └── <ModuleName>.Tests.ps1 # Pester test that is run against the built module on Linux, macOS, and Windows
338340
├── .gitattributes # Normalizes line endings across platforms
339341
├── .gitignore # Excludes build artifacts from source control
340-
├── LICENSE # License text surfaced in manifest metadata
341-
└── README.md # Repository overview rendered on GitHub and docs landing
342+
├── LICENSE # License, added to the manifest
343+
└── README.md # Repository overview rendered on GitHub and the landing for the docs
342344
```
343345

344346
**Key expectations:**
@@ -351,7 +353,11 @@ to compile, document, and publish.
351353
- The build step compiles `src/` into a root module file and removes the original project layout from the artifact.
352354
- Documentation generation mirrors the `src/functions/public` hierarchy so help content always aligns with source.
353355

354-
## Pipeline jobs
356+
## Phase details
357+
358+
### Discover and Plan
359+
360+
355361

356362
### Build Module
357363

0 commit comments

Comments
 (0)