From 4c3184e91512d4f6b6358b8b22d07afa467a584a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 17 Jan 2026 22:04:35 +0100 Subject: [PATCH 01/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20options?= =?UTF-8?q?=20to=20use=20PR=20title=20and=20body=20for=20release=20naming?= =?UTF-8?q?=20and=20notes=20in=20Publish-Module=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Publish-Module.yml | 3 +++ README.md | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index ab1e4c7c..aeecbb91 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -58,4 +58,7 @@ jobs: MinorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MinorLabels }} PatchLabels: ${{ fromJson(inputs.Settings).Publish.Module.PatchLabels }} VersionPrefix: ${{ fromJson(inputs.Settings).Publish.Module.VersionPrefix }} + UsePRTitleAsReleaseName: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsReleaseName }} + UsePRBodyAsReleaseNotes: ${{ fromJson(inputs.Settings).Publish.Module.UsePRBodyAsReleaseNotes }} + UsePRTitleAsNotesHeading: ${{ fromJson(inputs.Settings).Publish.Module.UsePRTitleAsNotesHeading }} WorkingDirectory: ${{ fromJson(inputs.Settings).WorkingDirectory }} diff --git a/README.md b/README.md index ec339342..52bed9f5 100644 --- a/README.md +++ b/README.md @@ -397,6 +397,9 @@ The following settings are available in the settings file: | `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` | | `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` | | `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` | +| `Publish.Module.UsePRTitleAsReleaseName` | `Boolean` | Use the PR title as the GitHub release name instead of version string | `false` | +| `Publish.Module.UsePRBodyAsReleaseNotes` | `Boolean` | Use the PR body as the release notes content | `true` | +| `Publish.Module.UsePRTitleAsNotesHeading` | `Boolean` | Prepend PR title as H1 heading with PR number link before the body | `true` | | `Linter.Skip` | `Boolean` | Skip repository linting | `false` | | `Linter.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for repository linting | `false` | | `Linter.env` | `Object` | Environment variables for super-linter configuration | `{}` | @@ -468,6 +471,9 @@ Publish: MinorLabels: 'minor, feature' PatchLabels: 'patch, fix' IgnoreLabels: 'NoRelease' + UsePRTitleAsReleaseName: false + UsePRBodyAsReleaseNotes: true + UsePRTitleAsNotesHeading: true Linter: Skip: false From 89a62e1bcd7ede5123cc719c2f6518489e748fd6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 17 Jan 2026 22:38:05 +0100 Subject: [PATCH 02/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20action?= =?UTF-8?q?=20references=20in=20workflows=20to=20use=20the=20releasenotes?= =?UTF-8?q?=20branch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Get-Settings.yml | 2 +- .github/workflows/Publish-Module.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index 2a66de64..ae1bd1b2 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@5be814463ddf37293196c5bd07c861f6fb617a59 # v1.0.3 + uses: PSModule/Get-PSModuleSettings@releasenotes id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index aeecbb91..8d4ab6a4 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -41,7 +41,7 @@ jobs: Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository - name: Publish module - uses: PSModule/Publish-PSModule@6c25d139fe51b890f75c057897bd58ac344b192a # v2.0.8 + uses: PSModule/Publish-PSModule@releasenotes env: GH_TOKEN: ${{ github.token }} with: From 9ca17a53d51717263aa2def1deb936211764cf60 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 17 Jan 2026 22:42:15 +0100 Subject: [PATCH 03/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20settin?= =?UTF-8?q?gs=20table=20formatting=20in=20README.md=20for=20improved=20rea?= =?UTF-8?q?dability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 88 +++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 52bed9f5..ef220456 100644 --- a/README.md +++ b/README.md @@ -359,50 +359,50 @@ The file can be a `JSON`, `YAML`, or `PSD1` file. By default, it will look for ` The following settings are available in the settings file: -| Name | Type | Description | Default | -| -------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------- | ------------------- | -| `Name` | `String` | Name of the module to publish. Defaults to the repository name. | `null` | -| `Test.Skip` | `Boolean` | Skip all tests | `false` | -| `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` | -| `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` | -| `Test.Windows.Skip` | `Boolean` | Skip tests on Windows | `false` | -| `Test.SourceCode.Skip` | `Boolean` | Skip source code tests | `false` | -| `Test.SourceCode.Linux.Skip` | `Boolean` | Skip source code tests on Linux | `false` | -| `Test.SourceCode.MacOS.Skip` | `Boolean` | Skip source code tests on macOS | `false` | -| `Test.SourceCode.Windows.Skip` | `Boolean` | Skip source code tests on Windows | `false` | -| `Test.PSModule.Skip` | `Boolean` | Skip PSModule framework tests | `false` | -| `Test.PSModule.Linux.Skip` | `Boolean` | Skip PSModule framework tests on Linux | `false` | -| `Test.PSModule.MacOS.Skip` | `Boolean` | Skip PSModule framework tests on macOS | `false` | -| `Test.PSModule.Windows.Skip` | `Boolean` | Skip PSModule framework tests on Windows | `false` | -| `Test.Module.Skip` | `Boolean` | Skip module tests | `false` | -| `Test.Module.Linux.Skip` | `Boolean` | Skip module tests on Linux | `false` | -| `Test.Module.MacOS.Skip` | `Boolean` | Skip module tests on macOS | `false` | -| `Test.Module.Windows.Skip` | `Boolean` | Skip module tests on Windows | `false` | -| `Test.TestResults.Skip` | `Boolean` | Skip test result processing | `false` | -| `Test.CodeCoverage.Skip` | `Boolean` | Skip code coverage tests | `false` | -| `Test.CodeCoverage.PercentTarget` | `Integer` | Target code coverage percentage | `0` | -| `Test.CodeCoverage.StepSummaryMode` | `String` | Step summary mode for code coverage reports | `'Missed, Files'` | -| `Build.Skip` | `Boolean` | Skip all build tasks | `false` | -| `Build.Module.Skip` | `Boolean` | Skip module build | `false` | -| `Build.Docs.Skip` | `Boolean` | Skip documentation build | `false` | -| `Build.Docs.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for documentation linting | `false` | -| `Build.Site.Skip` | `Boolean` | Skip site build | `false` | -| `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` | -| `Publish.Module.AutoCleanup` | `Boolean` | Automatically clean up old prerelease module versions | `true` | -| `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` | -| `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` | -| `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease (uses [.NET DateTime format strings](https://learn.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings)) | `''` | -| `Publish.Module.VersionPrefix` | `String` | Prefix for version tags | `'v'` | -| `Publish.Module.MajorLabels` | `String` | Labels indicating a major version bump | `'major, breaking'` | -| `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` | -| `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` | -| `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` | -| `Publish.Module.UsePRTitleAsReleaseName` | `Boolean` | Use the PR title as the GitHub release name instead of version string | `false` | -| `Publish.Module.UsePRBodyAsReleaseNotes` | `Boolean` | Use the PR body as the release notes content | `true` | -| `Publish.Module.UsePRTitleAsNotesHeading` | `Boolean` | Prepend PR title as H1 heading with PR number link before the body | `true` | -| `Linter.Skip` | `Boolean` | Skip repository linting | `false` | -| `Linter.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for repository linting | `false` | -| `Linter.env` | `Object` | Environment variables for super-linter configuration | `{}` | +| Name | Type | Description | Default | +| ----------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | +| `Name` | `String` | Name of the module to publish. Defaults to the repository name. | `null` | +| `Test.Skip` | `Boolean` | Skip all tests | `false` | +| `Test.Linux.Skip` | `Boolean` | Skip tests on Linux | `false` | +| `Test.MacOS.Skip` | `Boolean` | Skip tests on macOS | `false` | +| `Test.Windows.Skip` | `Boolean` | Skip tests on Windows | `false` | +| `Test.SourceCode.Skip` | `Boolean` | Skip source code tests | `false` | +| `Test.SourceCode.Linux.Skip` | `Boolean` | Skip source code tests on Linux | `false` | +| `Test.SourceCode.MacOS.Skip` | `Boolean` | Skip source code tests on macOS | `false` | +| `Test.SourceCode.Windows.Skip` | `Boolean` | Skip source code tests on Windows | `false` | +| `Test.PSModule.Skip` | `Boolean` | Skip PSModule framework tests | `false` | +| `Test.PSModule.Linux.Skip` | `Boolean` | Skip PSModule framework tests on Linux | `false` | +| `Test.PSModule.MacOS.Skip` | `Boolean` | Skip PSModule framework tests on macOS | `false` | +| `Test.PSModule.Windows.Skip` | `Boolean` | Skip PSModule framework tests on Windows | `false` | +| `Test.Module.Skip` | `Boolean` | Skip module tests | `false` | +| `Test.Module.Linux.Skip` | `Boolean` | Skip module tests on Linux | `false` | +| `Test.Module.MacOS.Skip` | `Boolean` | Skip module tests on macOS | `false` | +| `Test.Module.Windows.Skip` | `Boolean` | Skip module tests on Windows | `false` | +| `Test.TestResults.Skip` | `Boolean` | Skip test result processing | `false` | +| `Test.CodeCoverage.Skip` | `Boolean` | Skip code coverage tests | `false` | +| `Test.CodeCoverage.PercentTarget` | `Integer` | Target code coverage percentage | `0` | +| `Test.CodeCoverage.StepSummaryMode` | `String` | Step summary mode for code coverage reports | `'Missed, Files'` | +| `Build.Skip` | `Boolean` | Skip all build tasks | `false` | +| `Build.Module.Skip` | `Boolean` | Skip module build | `false` | +| `Build.Docs.Skip` | `Boolean` | Skip documentation build | `false` | +| `Build.Docs.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for documentation linting | `false` | +| `Build.Site.Skip` | `Boolean` | Skip site build | `false` | +| `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` | +| `Publish.Module.AutoCleanup` | `Boolean` | Automatically clean up old prerelease module versions | `true` | +| `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` | +| `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` | +| `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease (uses [.NET DateTime format strings](https://learn.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings)) | `''` | +| `Publish.Module.VersionPrefix` | `String` | Prefix for version tags | `'v'` | +| `Publish.Module.MajorLabels` | `String` | Labels indicating a major version bump | `'major, breaking'` | +| `Publish.Module.MinorLabels` | `String` | Labels indicating a minor version bump | `'minor, feature'` | +| `Publish.Module.PatchLabels` | `String` | Labels indicating a patch version bump | `'patch, fix'` | +| `Publish.Module.IgnoreLabels` | `String` | Labels indicating no release | `'NoRelease'` | +| `Publish.Module.UsePRTitleAsReleaseName` | `Boolean` | Use the PR title as the GitHub release name instead of version string | `false` | +| `Publish.Module.UsePRBodyAsReleaseNotes` | `Boolean` | Use the PR body as the release notes content | `true` | +| `Publish.Module.UsePRTitleAsNotesHeading` | `Boolean` | Prepend PR title as H1 heading with PR number link before the body | `true` | +| `Linter.Skip` | `Boolean` | Skip repository linting | `false` | +| `Linter.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for repository linting | `false` | +| `Linter.env` | `Object` | Environment variables for super-linter configuration | `{}` |
`PSModule.yml` with all defaults From 72f0486c386bdfedd1fe6b23a676bde6b131065e Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 00:37:17 +0100 Subject: [PATCH 04/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Add=20example?= =?UTF-8?q?=20section=20for=20configuring=20PR-based=20release=20notes=20i?= =?UTF-8?q?n=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index ef220456..3156f17c 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,10 @@ Depending on the labels in the pull requests, the [workflow will result in diffe - [Configuring Linter Validation Rules](#configuring-linter-validation-rules) - [Additional Configuration](#additional-configuration) - [Showing Linter Summary on Success](#showing-linter-summary-on-success) + - [Example 4 - Configuring PR-based release notes](#example-4---configuring-pr-based-release-notes) + - [Default configuration (recommended)](#default-configuration-recommended) + - [Version-only release names](#version-only-release-names) + - [Auto-generated notes](#auto-generated-notes) - [Skipping Individual Framework Tests](#skipping-individual-framework-tests) - [How to Skip Tests](#how-to-skip-tests) - [Available Framework Tests](#available-framework-tests) @@ -581,6 +585,71 @@ This is useful for reviewing what was checked even when no issues are found. For a complete list of available environment variables and configuration options, see the [super-linter environment variables documentation](https://github.com/super-linter/super-linter#environment-variables). +### Example 4 - Configuring PR-based release notes + +The workflow can automatically generate GitHub release names and notes from your pull request content. +Three parameters control this behavior: + +| Parameter | Description | +|-----------|-------------| +| `UsePRTitleAsReleaseName` | Use the PR title as the GitHub release name instead of the version string | +| `UsePRBodyAsReleaseNotes` | Use the PR body as the release notes content | +| `UsePRTitleAsNotesHeading` | Prepend PR title as H1 heading with PR number link before the body | + +These parameters follow specific precedence rules when building release notes: + +1. **Heading + Body** (`UsePRTitleAsNotesHeading: true` + `UsePRBodyAsReleaseNotes: true`): Creates formatted notes with the PR title as an H1 heading followed by the PR body. The output format is `# PR Title (#123)\n\nPR body content`. Both the PR title and body must be present. + +1. **Body only** (`UsePRBodyAsReleaseNotes: true`): Uses the PR body as-is for release notes. Takes effect when heading option is disabled or PR title is missing. + +1. **Fallback**: When neither option is enabled or required PR content is missing, GitHub's auto-generated release notes are used via `--generate-notes`. + +#### Default configuration (recommended) + +The defaults provide rich release notes with the PR title as a heading: + +```yaml +Publish: + Module: + UsePRTitleAsReleaseName: false + UsePRBodyAsReleaseNotes: true + UsePRTitleAsNotesHeading: true +``` + +This produces release notes like: + +```markdown +# 🚀 Add new authentication feature (#42) + +This PR adds OAuth2 support with the following changes: +- Added `Connect-OAuth2` function +- Updated documentation +``` + +#### Version-only release names + +If you prefer version numbers as release names but still want PR-based notes: + +```yaml +Publish: + Module: + UsePRTitleAsReleaseName: false + UsePRBodyAsReleaseNotes: true + UsePRTitleAsNotesHeading: false +``` + +#### Auto-generated notes + +To use GitHub's auto-generated release notes instead of PR content: + +```yaml +Publish: + Module: + UsePRTitleAsReleaseName: false + UsePRBodyAsReleaseNotes: false + UsePRTitleAsNotesHeading: false +``` + ## Skipping Individual Framework Tests The PSModule framework tests run automatically as part of the `Test-Module` and `Test-SourceCode` jobs. While you can skip entire test categories using the configuration settings (e.g., `Test.PSModule.Skip`), you can also skip individual framework tests on a per-file basis when needed. From 4d5e0b2cddef99d48edc6b32f4a1796cdc6abb6c Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 00:56:42 +0100 Subject: [PATCH 05/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20action?= =?UTF-8?q?=20references=20in=20workflows=20to=20use=20specific=20version?= =?UTF-8?q?=20tags=20for=20Get-Settings=20and=20Publish-Module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Get-Settings.yml | 2 +- .github/workflows/Publish-Module.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index ae1bd1b2..fb112405 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@releasenotes + uses: PSModule/Get-PSModuleSettings@ce4aac7e032758cac99eefbcaee73c68898daad5 # v1.1.0 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 8d4ab6a4..c222d1e6 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -41,7 +41,7 @@ jobs: Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository - name: Publish module - uses: PSModule/Publish-PSModule@releasenotes + uses: PSModule/Publish-PSModule@ebbfeec452b8587a15c7ce451c5a238109e983c3 # v2.1.0 env: GH_TOKEN: ${{ github.token }} with: From 223189807af0f7adabafd4b1b060811996f387e4 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 03:06:51 +0100 Subject: [PATCH 06/18] Update workflow comments to reflect actual run conditions --- .github/workflows/Publish-Module.yml | 2 ++ .github/workflows/workflow.yml | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index c222d1e6..8ffe21db 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -53,6 +53,8 @@ jobs: AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }} DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }} IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }} + PrereleaseLabels: ${{ fromJson(inputs.Settings).Publish.Module.PrereleaseLabels }} + ReleaseType: ${{ fromJson(inputs.Settings).Run.ReleaseType }} IncrementalPrerelease: ${{ fromJson(inputs.Settings).Publish.Module.IncrementalPrerelease }} MajorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MajorLabels }} MinorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MinorLabels }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4cc37f8c..953fdf54 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -248,10 +248,10 @@ jobs: Settings: ${{ needs.Get-Settings.outputs.Settings }} # Runs on: - # - ✅ Open/Updated PR - Publishes prerelease when all tests/coverage/build succeed - # - ✅ Merged PR - Publishes release when all tests/coverage/build succeed + # - ⚡ Open/Updated PR - Only with prerelease label: publishes prerelease version + # - ✅ Merged PR - To default branch only: publishes release when all tests/coverage/build succeed # - ✅ Abandoned PR - Publishes cleanup/retraction version - # - ✅ Manual run - Publishes when all tests/coverage/build succeed + # - ❌ Manual run - Only runs for PR events Publish-Module: if: fromJson(needs.Get-Settings.outputs.Settings).Run.PublishModule && needs.Get-Settings.result == 'success' && !cancelled() && (needs.Get-TestResults.result == 'success' || needs.Get-TestResults.result == 'skipped') && (needs.Get-CodeCoverage.result == 'success' || needs.Get-CodeCoverage.result == 'skipped') && (needs.Build-Site.result == 'success' || needs.Build-Site.result == 'skipped') uses: ./.github/workflows/Publish-Module.yml @@ -295,9 +295,9 @@ jobs: # Runs on: # - ❌ Open/Updated PR - Site not published for PRs in progress - # - ✅ Merged PR - Deploys site to GitHub Pages after successful merge + # - ✅ Merged PR - To default branch only: deploys site to GitHub Pages # - ❌ Abandoned PR - Site not published for abandoned changes - # - ❌ Manual run - Only publishes on merged PRs, not manual runs + # - ❌ Manual run - Only publishes on merged PRs to default branch Publish-Site: if: fromJson(needs.Get-Settings.outputs.Settings).Run.PublishSite && needs.Get-TestResults.result == 'success' && needs.Get-CodeCoverage.result == 'success' && needs.Build-Site.result == 'success' && !cancelled() uses: ./.github/workflows/Publish-Site.yml From 0eaec65c826be0e419813399feb53b1a9e7f2615 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 03:28:11 +0100 Subject: [PATCH 07/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Get-PS?= =?UTF-8?q?ModuleSettings=20action=20reference=20to=20version=201.3.0=20in?= =?UTF-8?q?=20Get-Settings=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Get-Settings.yml | 2 +- .github/workflows/workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index fb112405..df7bfcdf 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@ce4aac7e032758cac99eefbcaee73c68898daad5 # v1.1.0 + uses: PSModule/Get-PSModuleSettings@98ce7ab3fbd230e7ae97ecef74d818f8b3c9bbbf # v1.3.0 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 953fdf54..0a2936f3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -248,7 +248,7 @@ jobs: Settings: ${{ needs.Get-Settings.outputs.Settings }} # Runs on: - # - ⚡ Open/Updated PR - Only with prerelease label: publishes prerelease version + # - ✅ Open/Updated PR - Only with prerelease label: publishes prerelease version # - ✅ Merged PR - To default branch only: publishes release when all tests/coverage/build succeed # - ✅ Abandoned PR - Publishes cleanup/retraction version # - ❌ Manual run - Only runs for PR events From 06c378a10817d5a61e33e97a976995fa61133c43 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 03:33:17 +0100 Subject: [PATCH 08/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Publis?= =?UTF-8?q?h-Module=20action=20reference=20to=20use=20feature/releasetype-?= =?UTF-8?q?input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Publish-Module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 8ffe21db..09f82b71 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -41,7 +41,7 @@ jobs: Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository - name: Publish module - uses: PSModule/Publish-PSModule@ebbfeec452b8587a15c7ce451c5a238109e983c3 # v2.1.0 + uses: PSModule/Publish-PSModule@feature/releasetype-input env: GH_TOKEN: ${{ github.token }} with: From 29d1790b44c701ab51df6b85ecb2310761203498 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 03:43:26 +0100 Subject: [PATCH 09/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20Prerel?= =?UTF-8?q?easeLabels=20input=20from=20Publish-Module=20workflow=20and=20a?= =?UTF-8?q?dd=20ReleaseType=20input?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Publish-Module.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 09f82b71..53b6c77d 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -53,7 +53,6 @@ jobs: AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }} DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }} IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }} - PrereleaseLabels: ${{ fromJson(inputs.Settings).Publish.Module.PrereleaseLabels }} ReleaseType: ${{ fromJson(inputs.Settings).Run.ReleaseType }} IncrementalPrerelease: ${{ fromJson(inputs.Settings).Publish.Module.IncrementalPrerelease }} MajorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MajorLabels }} From 269d0cbfd233e4a5efd2904c76037d66bc6ec874 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 10:36:37 +0100 Subject: [PATCH 10/18] Update to use Publish.Module.ReleaseType and Publish.Module.CleanupPrereleases --- .github/workflows/Publish-Module.yml | 4 ++-- README.md | 4 ++-- tests/srcWithManifestTestRepo/.github/PSModule.yml | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 53b6c77d..15c5871c 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -49,11 +49,11 @@ jobs: ModulePath: outputs/module APIKey: ${{ secrets.APIKEY }} WhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }} - AutoCleanup: ${{ fromJson(inputs.Settings).Publish.Module.AutoCleanup }} + CleanupPrereleases: ${{ fromJson(inputs.Settings).Publish.Module.CleanupPrereleases }} AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }} DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }} IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }} - ReleaseType: ${{ fromJson(inputs.Settings).Run.ReleaseType }} + ReleaseType: ${{ fromJson(inputs.Settings).Publish.Module.ReleaseType }} IncrementalPrerelease: ${{ fromJson(inputs.Settings).Publish.Module.IncrementalPrerelease }} MajorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MajorLabels }} MinorLabels: ${{ fromJson(inputs.Settings).Publish.Module.MinorLabels }} diff --git a/README.md b/README.md index 3156f17c..84290083 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,7 @@ The following settings are available in the settings file: | `Build.Docs.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for documentation linting | `false` | | `Build.Site.Skip` | `Boolean` | Skip site build | `false` | | `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` | -| `Publish.Module.AutoCleanup` | `Boolean` | Automatically clean up old prerelease module versions | `true` | +| `Publish.Module.CleanupPrereleases` | `Boolean` | Automatically clean up old prerelease tags when merging to main or when a PR is abandoned | `true` | | `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` | | `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` | | `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease (uses [.NET DateTime format strings](https://learn.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings)) | `''` | @@ -466,7 +466,7 @@ Test: Publish: Module: Skip: false - AutoCleanup: true + CleanupPrereleases: true AutoPatching: true IncrementalPrerelease: true DatePrereleaseFormat: '' diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index ceaf2ff0..61d254b2 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -10,7 +10,8 @@ Test: CodeCoverage: PercentTarget: 1 Publish: - AutoCleanup: false + Module: + CleanupPrereleases: false Linter: env: VALIDATE_BIOME_FORMAT: false From bb2831df4e0cb9d6a4536c3ed2dee9c90eb3c08d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 11:05:06 +0100 Subject: [PATCH 11/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20redund?= =?UTF-8?q?ant=20lines=20in=20release=20notes=20section=20of=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 84290083..eb45de7f 100644 --- a/README.md +++ b/README.md @@ -599,9 +599,7 @@ Three parameters control this behavior: These parameters follow specific precedence rules when building release notes: 1. **Heading + Body** (`UsePRTitleAsNotesHeading: true` + `UsePRBodyAsReleaseNotes: true`): Creates formatted notes with the PR title as an H1 heading followed by the PR body. The output format is `# PR Title (#123)\n\nPR body content`. Both the PR title and body must be present. - 1. **Body only** (`UsePRBodyAsReleaseNotes: true`): Uses the PR body as-is for release notes. Takes effect when heading option is disabled or PR title is missing. - 1. **Fallback**: When neither option is enabled or required PR content is missing, GitHub's auto-generated release notes are used via `--generate-notes`. #### Default configuration (recommended) From 3d5089094837561781a561aa3dbdcdf34071b57a Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 11:25:35 +0100 Subject: [PATCH 12/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Get-PS?= =?UTF-8?q?ModuleSettings=20action=20reference=20to=20use=20'cleanup'=20ve?= =?UTF-8?q?rsion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Get-Settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index df7bfcdf..e9e13956 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@98ce7ab3fbd230e7ae97ecef74d818f8b3c9bbbf # v1.3.0 + uses: PSModule/Get-PSModuleSettings@cleanup id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} From ea29fbda75cece676e9e5a52155db20cebdf2b8f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 13:00:59 +0100 Subject: [PATCH 13/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Remove=20redund?= =?UTF-8?q?ant=20steps=20for=20downloading=20module=20artifact=20and=20upd?= =?UTF-8?q?ating=20PSResourceGet=20in=20Publish-Module=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Publish-Module.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 15c5871c..13dd6b62 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -29,17 +29,6 @@ jobs: persist-credentials: false fetch-depth: 0 - - name: Download module artifact - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 - with: - name: module - path: ${{ fromJson(inputs.Settings).WorkingDirectory }}/outputs/module - - - name: Update Microsoft.PowerShell.PSResourceGet - shell: pwsh - run: | - Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository - - name: Publish module uses: PSModule/Publish-PSModule@feature/releasetype-input env: From ca019bc518fd5cb2e8b2abafbf0fff50c1215f85 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 13:40:33 +0100 Subject: [PATCH 14/18] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Replace=20Clean?= =?UTF-8?q?upPrereleases=20input=20with=20AutoCleanup=20in=20Publish-Modul?= =?UTF-8?q?e=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Publish-Module.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Publish-Module.yml b/.github/workflows/Publish-Module.yml index 13dd6b62..b4b365ed 100644 --- a/.github/workflows/Publish-Module.yml +++ b/.github/workflows/Publish-Module.yml @@ -38,7 +38,7 @@ jobs: ModulePath: outputs/module APIKey: ${{ secrets.APIKEY }} WhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }} - CleanupPrereleases: ${{ fromJson(inputs.Settings).Publish.Module.CleanupPrereleases }} + AutoCleanup: ${{ fromJson(inputs.Settings).Publish.Module.AutoCleanup }} AutoPatching: ${{ fromJson(inputs.Settings).Publish.Module.AutoPatching }} DatePrereleaseFormat: ${{ fromJson(inputs.Settings).Publish.Module.DatePrereleaseFormat }} IgnoreLabels: ${{ fromJson(inputs.Settings).Publish.Module.IgnoreLabels }} From 71887c8e6aa90719e3e9c895cae3229c494fde7f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 14:54:32 +0100 Subject: [PATCH 15/18] Keep AutoCleanup name instead of renaming to CleanupPrereleases --- README.md | 4 ++-- tests/srcWithManifestTestRepo/.github/PSModule.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb45de7f..2e5e21c0 100644 --- a/README.md +++ b/README.md @@ -392,7 +392,7 @@ The following settings are available in the settings file: | `Build.Docs.ShowSummaryOnSuccess` | `Boolean` | Show super-linter summary on success for documentation linting | `false` | | `Build.Site.Skip` | `Boolean` | Skip site build | `false` | | `Publish.Module.Skip` | `Boolean` | Skip module publishing | `false` | -| `Publish.Module.CleanupPrereleases` | `Boolean` | Automatically clean up old prerelease tags when merging to main or when a PR is abandoned | `true` | +| `Publish.Module.AutoCleanup` | `Boolean` | Automatically clean up old prerelease tags when merging to main or when a PR is abandoned | `true` | | `Publish.Module.AutoPatching` | `Boolean` | Automatically patch module version | `true` | | `Publish.Module.IncrementalPrerelease` | `Boolean` | Use incremental prerelease versioning | `true` | | `Publish.Module.DatePrereleaseFormat` | `String` | Format for date-based prerelease (uses [.NET DateTime format strings](https://learn.microsoft.com/dotnet/standard/base-types/standard-date-and-time-format-strings)) | `''` | @@ -466,7 +466,7 @@ Test: Publish: Module: Skip: false - CleanupPrereleases: true + AutoCleanup: true AutoPatching: true IncrementalPrerelease: true DatePrereleaseFormat: '' diff --git a/tests/srcWithManifestTestRepo/.github/PSModule.yml b/tests/srcWithManifestTestRepo/.github/PSModule.yml index 61d254b2..4ecb9116 100644 --- a/tests/srcWithManifestTestRepo/.github/PSModule.yml +++ b/tests/srcWithManifestTestRepo/.github/PSModule.yml @@ -11,7 +11,7 @@ Test: PercentTarget: 1 Publish: Module: - CleanupPrereleases: false + AutoCleanup: false Linter: env: VALIDATE_BIOME_FORMAT: false From 0ca3b5490fa1be5f5ac6d66ebf25b4ba95054eb1 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 14:59:40 +0100 Subject: [PATCH 16/18] docs: Add abandoned PR cleanup documentation --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e5e21c0..ecf59711 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,10 @@ The [PSModule - Module tests](./scripts/tests/Module/PSModule/PSModule.Tests.ps1 [workflow](./.github/workflows/Publish-Module.yml) - Publishes the module to the PowerShell Gallery. - Creates a release on the GitHub repository. +- **Abandoned PR cleanup**: When a PR is closed without merging (abandoned), the workflow automatically cleans up any + prerelease versions and tags that were created for that PR. This ensures that abandoned work doesn't leave orphaned + prereleases in the PowerShell Gallery or repository. This behavior is controlled by the `Publish.Module.AutoCleanup` + setting. ### Build docs @@ -354,7 +358,8 @@ This table shows when each job runs based on the trigger scenario: - \* Runs for cleanup if tests were started - \*\* Only when all tests/coverage/build succeed -- \*\*\* Publishes cleanup/retraction version +- \*\*\* Cleans up prerelease versions and tags created for the abandoned PR (when `Publish.Module.AutoCleanup` is + enabled) ## Configuration From 3dc0504bf78dacd0a717362f6507e0c7a29578e5 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 15:09:31 +0100 Subject: [PATCH 17/18] chore: Update Get-PSModuleSettings to v1 --- .github/workflows/Get-Settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index e9e13956..fef96b3a 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@cleanup + uses: PSModule/Get-PSModuleSettings@v1 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }} From 2eb2bb942aa28d47a8fa37ead8e08da1d56cdb07 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 18 Jan 2026 15:10:42 +0100 Subject: [PATCH 18/18] chore: Pin Get-PSModuleSettings to SHA for v1.4.0 --- .github/workflows/Get-Settings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Get-Settings.yml b/.github/workflows/Get-Settings.yml index fef96b3a..4357e302 100644 --- a/.github/workflows/Get-Settings.yml +++ b/.github/workflows/Get-Settings.yml @@ -55,7 +55,7 @@ jobs: fetch-depth: 0 - name: Get-Settings - uses: PSModule/Get-PSModuleSettings@v1 + uses: PSModule/Get-PSModuleSettings@28c1805d689dc5bfcfba7489e76c34a6d33d7da8 # v1.4.0 id: Get-Settings with: SettingsPath: ${{ inputs.SettingsPath }}