Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
[![Downloads](https://img.shields.io/powershellgallery/dt/{MODULE_NAME}.svg)](https://www.powershellgallery.com/packages/{MODULE_NAME})
[![License](https://img.shields.io/github/license/{MODULE_PATH})](LICENSE)

## About

{MODULE_NAME} is a PowerShell module that {BRIEF_MODULE_PURPOSE}. It aims to {MODULE_GOALS_OR_OBJECTIVES}.

## Why {MODULE_NAME}?

{MODULE_NAME} is designed to {BRIEF_MODULE_PURPOSE}. It simplifies {SPECIFIC_TASKS_OR_PROCESSES} by providing {KEY_BENEFITS_OR_FEATURES}.

## 🚀 Getting Started

### Prerequisites
Expand Down Expand Up @@ -36,8 +44,8 @@ Get-Command -Module {MODULE_NAME}

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

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

## 🤝 Contributing

Expand Down
23 changes: 23 additions & 0 deletions .github/DOCS_TEMPLATE/getting-started_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# {MODULE_NAME} Usage Guide

## Overview

{MODULE_DESCRIPTION}

## Key Features

## Core Functions

## Complete Workflow Example

## Pipeline Examples

## Error Handling

## Best Practices

## Security Considerations

## Troubleshooting

## Resources
3 changes: 2 additions & 1 deletion .github/actions/ps-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,6 @@ runs:
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config push.autoSetupRemote true
git commit -m "Update PowerShell help for release v${{ steps.gitversion.outputs.majorMinorPatch }}"
git push origin HEAD:main
git push
14 changes: 10 additions & 4 deletions .github/actions/ps-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ inputs:
publish-psgallery:
description: Publish to PowerShell Gallery
required: true
secrets:
PSGALLERY_API_KEY:
description: API Key for PowerShell Gallery
required: false
runs:
using: composite
steps:
Expand All @@ -20,12 +24,16 @@ runs:
GITHUB_TOKEN: ${{ github.token }}
run: |
git fetch --tags
$previousTag = (git tag --sort=-v:refname)[0]
$tags = @(git tag --sort=-v:refname)
$previousTag = if ($tags.Count -gt 0) { $tags[0] } else { $null }
$uri = "https://api.github.com/repos/${{ github.repository }}/releases/generate-notes"
$body = @{
tag_name = "v${{ inputs.release-version }}"
target_commitish = "main"
previous_tag_name = $previousTag
}
# Only include previous_tag_name if a previous tag exists
if ($previousTag) {
$body['previous_tag_name'] = $previousTag
}
$requestParams = @{
Method = 'Post'
Expand Down Expand Up @@ -54,8 +62,6 @@ runs:
- name: Publish build package to PSGallery
if: ${{ inputs.publish-psgallery == 'true' && env.PSGALLERY_API_KEY != '' }}
shell: pwsh
env:
PSGALLERY_API_KEY: ${{ env.PSGALLERY_API_KEY }}
run: |
Set-StrictMode -Version Latest
[void] (Import-Module InvokeBuild)
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
MODULE_DESCRIPTION="${{ needs.get_repo_state.outputs.description }}"
MODULE_PATH=${{ github.repository }}
rm README.md
mv .github/README_template.md README.md
mv .github/DOCS_TEMPLATE/README_template.md README.md
sed -i "s|PSScriptModule|$MODULE_NAME|g" README.md
sed -i "s|{MODULE_NAME}|$MODULE_NAME|g" README.md
sed -i "s|{MODULE_DESCRIPTION}|$MODULE_DESCRIPTION|g" README.md
Expand Down Expand Up @@ -169,8 +169,12 @@ jobs:

- name: Update getting-started.md
run: |
rm docs/getting-started.md
mv .github/DOCS_TEMPLATE/getting-started_template.md docs/getting-started.md
MODULE_NAME=${{ github.event.repository.name }}
sed -i "s/PSScriptModule/$MODULE_NAME/g" docs/getting-started.md
MODULE_DESCRIPTION="${{ needs.get_repo_state.outputs.description }}"
sed -i "s/{MODULE_NAME}/$MODULE_NAME/g" docs/getting-started.md
sed -i "s/{MODULE_DESCRIPTION}/$MODULE_DESCRIPTION/g" docs/getting-started.md

- name: Update integration test file
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ on:
- '*.psd1'

jobs:
changes:
name: Label Changes
runs-on: [ubuntu-latest]
if: github.event_name == 'pull_request'
permissions:
contents: read
pull-requests: write
steps:
- name: Labeler
id: labeler
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b #v6.0.1

dependencies:
name: Dependencies
runs-on: ubuntu-latest
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,28 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}
fetch-depth: 0

- name: Resolve dependencies
id: resolve
uses: ./.github/actions/ps-resolve-dependencies

- name: Build Module
id: build
uses: ./.github/actions/ps-build
with:
release-type: ${{ inputs['release-type'] }}
module-list: ${{ steps.resolve.outputs.module-list }}

- name: Release Module
uses: ./.github/actions/ps-release
env:
PSGALLERY_API_KEY: ${{ secrets.NUGETAPIKEY_PSGALLERY }}
with:
release-type: ${{ inputs['release-type'] }}
release-version: ${{ steps.build.outputs.release-version }}
module-list: ${{ steps.resolve.outputs.module-list }}
publish-psgallery: ${{ inputs.publish-psgallery }}
2 changes: 1 addition & 1 deletion tests/Integration/Module.Integration.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Describe 'PSScriptModule Integration Tests' -Tag 'Integration' {
}

It 'Public function files' {
$publicFunctionFiles | Should -HaveCount 1 -Because 'The template ships with a single public function'
$publicFunctionFiles.Count | Should -BeGreaterThan 0
}

It 'Should discover public functions from src/Public' {
Expand Down