Skip to content

Commit 3282b3a

Browse files
Add documentation templates and update workflows for module release process
1 parent 0bfb625 commit 3282b3a

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
[![Downloads](https://img.shields.io/powershellgallery/dt/{MODULE_NAME}.svg)](https://www.powershellgallery.com/packages/{MODULE_NAME})
88
[![License](https://img.shields.io/github/license/{MODULE_PATH})](LICENSE)
99

10+
## About
11+
12+
{MODULE_NAME} is a PowerShell module that {BRIEF_MODULE_PURPOSE}. It aims to {MODULE_GOALS_OR_OBJECTIVES}.
13+
14+
## Why {MODULE_NAME}?
15+
16+
{MODULE_NAME} is designed to {BRIEF_MODULE_PURPOSE}. It simplifies {SPECIFIC_TASKS_OR_PROCESSES} by providing {KEY_BENEFITS_OR_FEATURES}.
17+
1018
## 🚀 Getting Started
1119

1220
### Prerequisites
@@ -36,8 +44,8 @@ Get-Command -Module {MODULE_NAME}
3644

3745
Comprehensive documentation is available in the [`docs/`](docs/) directory:
3846

47+
- 🚀 **[Getting Started](docs/getting-started.md)** - Practical examples and usage scenarios
3948
- 📘 **[Module Help](docs/)** - Help files for cmdlets and functions
40-
- 🚀 **[Examples](docs/examples/)** - Practical examples and usage scenarios
4149

4250
## 🤝 Contributing
4351

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# {MODULE_NAME} Usage Guide
2+
3+
## Overview
4+
5+
{MODULE_DESCRIPTION}
6+
7+
## Key Features
8+
9+
## Core Functions
10+
11+
## Complete Workflow Example
12+
13+
## Pipeline Examples
14+
15+
## Error Handling
16+
17+
## Best Practices
18+
19+
## Security Considerations
20+
21+
## Troubleshooting
22+
23+
## Resources

.github/actions/ps-release/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
publish-psgallery:
1111
description: Publish to PowerShell Gallery
1212
required: true
13+
secrets:
14+
PSGALLERY_API_KEY:
15+
description: API Key for PowerShell Gallery
16+
required: false
1317
runs:
1418
using: composite
1519
steps:
@@ -58,8 +62,6 @@ runs:
5862
- name: Publish build package to PSGallery
5963
if: ${{ inputs.publish-psgallery == 'true' && env.PSGALLERY_API_KEY != '' }}
6064
shell: pwsh
61-
env:
62-
PSGALLERY_API_KEY: ${{ env.PSGALLERY_API_KEY }}
6365
run: |
6466
Set-StrictMode -Version Latest
6567
[void] (Import-Module InvokeBuild)

.github/workflows/bootstrap.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
MODULE_DESCRIPTION="${{ needs.get_repo_state.outputs.description }}"
117117
MODULE_PATH=${{ github.repository }}
118118
rm README.md
119-
mv .github/README_template.md README.md
119+
mv .github/DOCS_TEMPLATE/README_template.md README.md
120120
sed -i "s|PSScriptModule|$MODULE_NAME|g" README.md
121121
sed -i "s|{MODULE_NAME}|$MODULE_NAME|g" README.md
122122
sed -i "s|{MODULE_DESCRIPTION}|$MODULE_DESCRIPTION|g" README.md
@@ -169,8 +169,12 @@ jobs:
169169
170170
- name: Update getting-started.md
171171
run: |
172+
rm docs/getting-started.md
173+
mv .github/DOCS_TEMPLATE/getting-started_template.md docs/getting-started.md
172174
MODULE_NAME=${{ github.event.repository.name }}
173-
sed -i "s/PSScriptModule/$MODULE_NAME/g" docs/getting-started.md
175+
MODULE_DESCRIPTION="${{ needs.get_repo_state.outputs.description }}"
176+
sed -i "s/{MODULE_NAME}/$MODULE_NAME/g" docs/getting-started.md
177+
sed -i "s/{MODULE_DESCRIPTION}/$MODULE_DESCRIPTION/g" docs/getting-started.md
174178
175179
- name: Update integration test file
176180
run: |

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,28 @@ jobs:
2525
runs-on: ubuntu-latest
2626
permissions:
2727
contents: write
28-
env:
29-
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
3028
steps:
3129
- name: Checkout repository
3230
uses: actions/checkout@v6
3331
with:
3432
repository: ${{ github.repository }}
3533
fetch-depth: 0
34+
3635
- name: Resolve dependencies
3736
id: resolve
3837
uses: ./.github/actions/ps-resolve-dependencies
38+
3939
- name: Build Module
4040
id: build
4141
uses: ./.github/actions/ps-build
4242
with:
4343
release-type: ${{ inputs['release-type'] }}
4444
module-list: ${{ steps.resolve.outputs.module-list }}
45+
4546
- name: Release Module
4647
uses: ./.github/actions/ps-release
48+
env:
49+
PSGALLERY_API_KEY: ${{ secrets.NUGETAPIKEY_PSGALLERY }}
4750
with:
48-
release-type: ${{ inputs['release-type'] }}
4951
release-version: ${{ steps.build.outputs.release-version }}
50-
module-list: ${{ steps.resolve.outputs.module-list }}
5152
publish-psgallery: ${{ inputs.publish-psgallery }}

0 commit comments

Comments
 (0)