Skip to content

Commit 0df036a

Browse files
documentation
1 parent 2d48c45 commit 0df036a

2 files changed

Lines changed: 88 additions & 1 deletion

File tree

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
3+
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
4+
"powershell.codeFormatting.openBraceOnSameLine": false,
5+
"powershell.codeFormatting.newLineAfterOpenBrace": true,
6+
"editor.rulers": [
7+
80,
8+
120
9+
],
10+
"editor.formatOnSave": true,
11+
"editor.insertSpaces": true,
12+
"editor.tabSize": 1,
13+
"[json]": {
14+
"editor.tabSize": 2
15+
},
16+
"[powershell]": {
17+
"editor.tabSize": 1,
18+
"editor.insertSpaces": true
19+
}
20+
}

README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,68 @@
1-
# CreatePowerShellModule
1+
# Create PowerShell Module GitHub Action
2+
3+
This action creates a PowerShell module from source files.
4+
5+
## Inputs
6+
7+
### `ModuleName`
8+
9+
**Required** The name of the PowerShell module.
10+
11+
### `Source`
12+
13+
**Optional** The source directory containing the module (relative to the workspace).
14+
15+
### `Output`
16+
17+
**Optional** TThe output directory for storing the module (relative to the workspace).
18+
19+
### `Imports`
20+
21+
**Required** Comma-separated list of import folders.
22+
23+
### `Debug`
24+
25+
**Optional** Enable debug mode. The default is `false``.
26+
27+
## Example usage
28+
29+
```yaml
30+
name: Build PowerShell Module
31+
32+
on:
33+
push:
34+
branches:
35+
- main
36+
pull_request:
37+
branches:
38+
- main
39+
40+
jobs:
41+
build:
42+
runs-on: windows-latest
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v2
47+
with:
48+
path: MySuperModule # Custom path for the checkout
49+
50+
- name: Download PowerShell Manifest
51+
uses: actions/download-artifact@v2
52+
with:
53+
name: your-module-manifest
54+
path: ${{ github.workspace }}/artifacts/your-module
55+
56+
- name: Build PowerShell Module
57+
uses: your-username/your-repo@v1 # Replace with your repository details
58+
with:
59+
ModuleName: 'your-module'
60+
Source: 'MySuperModule' # Use the custom path here
61+
Imports: 'folder1,folder2'
62+
Debug: 'true'
63+
64+
- name: Upload PowerShell Module
65+
uses: actions/upload-artifact@v2
66+
with:
67+
name: your-module-output
68+
path: ${{ github.workspace }}/output

0 commit comments

Comments
 (0)