Skip to content

Commit 3f9d3e8

Browse files
📖 [Docs]: Update to docs (#113)
## Description This pull request updates the `README.md` file to improve documentation for a PowerShell module build process. The changes include adding a new step to the build process, clarifying repository structure expectations, and renaming a section for better clarity. ### Documentation Updates: * **Added a new step to the build process:** Documented the step that uploads the module artifact for use in subsequent workflow steps. (`README.md`, [README.mdR25](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R25)) * **Defined expected repository structure:** Added a section describing the expected repository structure, referencing the `Template-PSModule` repository as an example. (`README.md`, [README.mdR40-R43](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R40-R43)) * **Renamed "Sources" section to "References":** Updated the section title to better reflect its purpose. (`README.md`, [README.mdL154-R159](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L154-R159)) ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8cccec4 commit 3f9d3e8

File tree

1 file changed

+44
-39
lines changed

1 file changed

+44
-39
lines changed

README.md

Lines changed: 44 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This step lets you add custom build logic to process or modify the module conten
2222
1. **Copies the source code** of the module to an output folder.
2323
1. **Builds the module manifest file** based on information from the GitHub repository and the source code. For more information, please read the [Module Manifest](#module-manifest) section.
2424
1. **Builds the root module (.psm1) file** by combining source code and adding automation into the root module file. For more information, please read the [Root module](#root-module) section.
25+
1. **Uploads the module artifact** so that it can be used in the next steps of the workflow.
2526

2627
## Usage
2728

@@ -36,6 +37,9 @@ This step lets you add custom build logic to process or modify the module conten
3637
| `Prerelease` | Allow prerelease versions if available. | `false` | `'false'` |
3738
| `WorkingDirectory` | The working directory where the script runs. | `false` | `'.'` |
3839

40+
## Expected repository structure
41+
42+
The action expects the module repository to be structured similarly to [Template-PSModule](https://github.com/PSModule/Template-PSModule).
3943
## Root module
4044

4145
The `src` folder may contain a 'root module' file. If present, the build function will disregard this file and build a new root module file based on the source code in the module folder.
@@ -90,49 +94,50 @@ During the module manifest build process the following steps are performed:
9094
1. `ExternalModuleDependencies` is not automated. If specified in the source manifest, that value is used.
9195
1. `HelpInfoURI` is not automated. If specified in the source manifest, that value is used.
9296
1. Create a new manifest file in the output folder with the gathered information, which also generates a new `GUID` for the module.
93-
1. Format the manifest file using the `Set-ModuleManifest` function from the [Utilities](https://github.com/PSModule/Utilities) module.
9497

95-
Linking the description to the module manifest file might show more how this works:
98+
### Sources for properties in the manifest file
99+
100+
Below is a list of properties in the module manifest file and their sources:
96101

97102
```powershell
98103
@{
99-
RootModule = 'Utilities.psm1' # Generated from the module name, <moduleName>.psm1
100-
ModuleVersion = '0.0.1' # Set during release using Publish-PSModule.
101-
CompatiblePSEditions = @() # Get from source files, requires -PSEdition <PSEdition-Name>, null if not provided.
102-
GUID = '<GUID>' # Generated when saving the manifest using New-ModuleManifest.
103-
Author = 'PSModule' # Derived from the GitHub Owner, unless specified in the source manifest.
104-
CompanyName = 'PSModule' # Derived from the GitHub Owner, unless specified in the source manifest.
105-
Copyright = '(c) 2024 PSModule. All rights reserved.'
104+
RootModule = 'Utilities.psm1' # Generated as <ModuleName>.psm1 from the module name; can be overridden in the source manifest.
105+
ModuleVersion = '0.0.1' # Temporary version set during the build; updated by PublishPSModule during the release process.
106+
CompatiblePSEditions = @() # Determined from #Requires -PSEdition statements in source files.; defaults to @('Core','Desktop') if none found.
107+
GUID = '<GUID>' # New GUID generated by New‑ModuleManifest when the manifest is created.
108+
Author = 'PSModule' # Derived from the GitHub owner unless specified in the source manifest.
109+
CompanyName = 'PSModule' # Derived from the GitHub owner unless specified in the source manifest.
110+
Copyright = '(c) 2024 PSModule. All rights reserved.' # Default template; overridden if specified in the source manifest.
106111
Description = 'This is a module.' # Taken from the repository description or the source manifest.
107-
PowerShellVersion = '' # Derived from source files, requires -Version <N>[.<n>], null if not provided.
108-
PowerShellHostName = '' # Taken from the manifest file, null if not provided.
109-
PowerShellHostVersion = '' # Taken from the manifest file, null if not provided.
110-
DotNetFrameworkVersion = '' # Taken from the manifest file, null if not provided.
111-
ClrVersion = '' # Taken from the manifest file, null if not provided.
112-
ProcessorArchitecture = '' # Taken from the manifest file, null if not provided.
113-
RequiredModules = @() # Derived from source files, ensuring required modules are installed.
114-
RequiredAssemblies = @() # Collected from assemblies\*.dll and modules\*.dll.
115-
ScriptsToProcess = @() # Collected from scripts\*.ps1 and classes\*.ps1 ordered by name.
116-
TypesToProcess = @() # Collected from *.Types.ps1xml files in the source folder.
117-
FormatsToProcess = @() # Collected from *.Format.ps1xml files in the source folder.
118-
NestedModules = @() # Collected from modules\*.psm1, modules\*.ps1, and modules\*.dll.
119-
FunctionsToExport = @() # Collected from public\*.ps1 files.
120-
CmdletsToExport = @() # Taken from the manifest file, or empty if not provided.
121-
VariablesToExport = @() # Collected from variables\public\*.ps1.
122-
AliasesToExport = '*' # Derived from functions\public\*.ps1.
123-
DscResourcesToExport = @() # Collected from resources\*.psm1.
124-
ModuleList = @() # A listing of all .\*.psm1 files (informational only).
125-
FileList = @() # A listing of all .\* files (informational only).
112+
PowerShellVersion = '' # Derived from #Requires -Version statements in source files; blank if none.
113+
PowerShellHostName = '' # Preserved from the source manifest if provided; otherwise omitted.
114+
PowerShellHostVersion = '' # Preserved from the source manifest if provided; otherwise omitted.
115+
DotNetFrameworkVersion = '' # Preserved from the source manifest if provided; otherwise omitted.
116+
ClrVersion = '' # Preserved from the source manifest if provided; otherwise omitted.
117+
ProcessorArchitecture = '' # Preserved from the source manifest if provided; otherwise omitted.
118+
RequiredModules = @() # Gathered from #Requires -Modules statements in source files.
119+
RequiredAssemblies = @() # Collected from assemblies/*.dll and modules/*.dll (depth = 1).
120+
ScriptsToProcess = @() # Collected from scripts/*.ps1, loaded alphabetically into the caller session.
121+
TypesToProcess = @() # Collected from *.Types.ps1xml files anywhere in the source folder.
122+
FormatsToProcess = @() # Collected from *.Format.ps1xml files anywhere in the source folder.
123+
NestedModules = @() # Collected from modules/* (.psm1, .ps1 or .dll one level down).
124+
FunctionsToExport = @() # Collected from functions/public/*.ps1 files.
125+
CmdletsToExport = @() # Preserved from the source manifest if provided; empty otherwise.
126+
VariablesToExport = @() # Collected from variables/public/*.ps1 files.
127+
AliasesToExport = '*' # Generated from functions/public/*.ps1.
128+
DscResourcesToExport = @() # Collected from resources/*.psm1 files.
129+
ModuleList = @() # Informational list of all additional *.psm1 files in the module.
130+
FileList = @() # Informational list of all files in the module source folder.
126131
PrivateData = @{
127132
PSData = @{
128-
Tags = @() # Derived from repository topics and compatibility tags.
129-
LicenseUri = '' # Generated public link to .\LICENSE.
130-
ProjectUri = '' # Generated public link to the GitHub Repository.
131-
IconUri = '' # Derived from .\icon\icon.png.
132-
ReleaseNotes = '' # To be updated during release.
133-
Prerelease = '' # Normalized version of the branch name, updated during release.
134-
RequireLicenseAcceptance = $false
135-
ExternalModuleDependencies = @()
133+
Tags = @() # Generated from repository topics plus compatibility tags.
134+
LicenseUri = '' # Public link to LICENSE file (or value from source manifest).
135+
ProjectUri = '' # Public link to the GitHub repository (or value from source manifest).
136+
IconUri = '' # Public link to icon\icon.png (or value from source manifest).
137+
ReleaseNotes = '' # Not automated; supply via PR or release description.
138+
Prerelease = '' # Managed by Publish‑PSModule; populated during release.
139+
RequireLicenseAcceptance = $false # Defaults to $false unless specified in the source manifest.
140+
ExternalModuleDependencies = @() # Not automated; preserved if present in the source manifest.
136141
ExperimentalFeatures = @(
137142
@{
138143
Name = "SomeExperimentalFeature"
@@ -142,16 +147,16 @@ Linking the description to the module manifest file might show more how this wor
142147
}
143148
OtherKeys = @{}
144149
}
145-
HelpInfoURI = '' # Taken from the source manifest if provided.
146-
DefaultCommandPrefix = '' # Taken from the source manifest if provided.
150+
HelpInfoURI = '' # Not automated; preserved if provided in the source manifest.
151+
DefaultCommandPrefix = '' # Not automated; preserved if provided in the source manifest.
147152
}
148153
```
149154

150155
## Permissions
151156

152157
This action does not require any special permissions.
153158

154-
## Sources
159+
## References
155160

156161
**Module manifest:**
157162

0 commit comments

Comments
 (0)