Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ee24a8d
Add canonical release decision resolver
MariusStorhaug Aug 28, 2026
8071946
Enforce namespaced release decisions
MariusStorhaug Aug 28, 2026
d7b5359
Run release checks on label transitions
MariusStorhaug Aug 28, 2026
c17172a
Document the v3 release label contract
MariusStorhaug Aug 28, 2026
8e4578b
Cover the complete release label matrix
MariusStorhaug Aug 28, 2026
0a8c09a
Keep release checks safe for dry runs and forks
MariusStorhaug Aug 28, 2026
a2ec196
Restrict prereleases to open pull requests
MariusStorhaug Aug 28, 2026
efc2b38
Scope release concurrency to each pull request
MariusStorhaug Aug 28, 2026
be73e64
Document the trusted release trigger
MariusStorhaug Aug 28, 2026
a1c6728
Resolve unlabeled releases from DefaultBump
MariusStorhaug Aug 29, 2026
9f13a19
Expose DefaultBump in the action contract
MariusStorhaug Aug 29, 2026
a3b76e0
Document DefaultBump precedence and migration
MariusStorhaug Aug 29, 2026
fd25814
Preserve terminating native command failures
MariusStorhaug Aug 29, 2026
2c19496
Apply the patch default consistently
MariusStorhaug Aug 29, 2026
9d0b79c
Target prereleases at the pull request head
MariusStorhaug Aug 29, 2026
e3d91ea
Render concrete dry-run comment commands
MariusStorhaug Aug 29, 2026
eb79780
Fail clearly on invalid prerelease context
MariusStorhaug Aug 29, 2026
0265cf5
Use the release prerelease qualifier
MariusStorhaug Sep 4, 2026
2f55615
Document the release prerelease qualifier
MariusStorhaug Sep 4, 2026
bae3d66
Restrict cleanup to matching prereleases
MariusStorhaug Sep 4, 2026
ed54c8f
Resolve effective settings without losing explicit overrides
MariusStorhaug Oct 31, 2026
a71f7d1
Exercise the release caller without repository mutations
MariusStorhaug Oct 31, 2026
8fac168
Add explicit caller overrides and release-decision provenance
MariusStorhaug Oct 31, 2026
89b7766
Preserve valid release contexts and queue stable publication
MariusStorhaug Oct 31, 2026
b8767c4
Match cleanup identities exactly and keep skip version-free
MariusStorhaug Oct 31, 2026
4007dbe
Read canonical release settings and reject legacy paths
MariusStorhaug Nov 1, 2026
03e20b8
Document the canonical release settings reader
MariusStorhaug Nov 1, 2026
3e1b28e
Separate the filename migration from owned release decisions
MariusStorhaug Nov 13, 2026
37d7539
Use named inputs for explicit release-setting overrides
MariusStorhaug Nov 15, 2026
47202d7
Explain inherited named action settings
MariusStorhaug Nov 15, 2026
2fc7c58
Rename the settings path input to SettingsFilePath
MariusStorhaug Nov 15, 2026
d190349
Exercise an existing caller settings file in the hosted test
MariusStorhaug Nov 15, 2026
9e1c370
Use file-backed release standards and natural input omission
MariusStorhaug Nov 15, 2026
a28d7a6
Keep automatic bump policy in the settings file
MariusStorhaug Nov 15, 2026
714b801
Keep discoverable release standards in action metadata
MariusStorhaug Nov 15, 2026
7ab87bc
Resolve startup settings before GitHub-Script
MariusStorhaug Nov 16, 2026
1040867
Exercise resolved startup inputs in the read-only caller
MariusStorhaug Nov 16, 2026
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
90 changes: 87 additions & 3 deletions .github/workflows/Action-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,48 @@ run-name: "Action-Test - [${{ github.event.pull_request.title }} #${{ github.eve
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
- unlabeled
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: read
permissions: {}

jobs:
UnitTest:
name: Pester 6.1
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Test release decisions
uses: PSModule/Invoke-Pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0
with:
Path: tests
Version: 6.1.0
Prescript: |
Install-PSResource -Name powershell-yaml -Version '[0.4.12]' -TrustRepository -Repository PSGallery
Install-PSResource -Name PSSemVer -Version '[1.1.10]' -TrustRepository -Repository PSGallery

ActionTestDefault:
name: Action-Test - [Default]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
Comment thread
MariusStorhaug marked this conversation as resolved.
Resolved
steps:
- name: Checkout repo
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand All @@ -30,3 +57,60 @@ jobs:
uses: ./
with:
WhatIf: true

- name: Prepare caller settings
id: caller-settings
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$settingsFilePath = Join-Path -Path $env:RUNNER_TEMP -ChildPath 'release-caller.settings.yml'
@'
DefaultBump: major
AutoCleanup: true
CreateMajorTag: false
DatePrereleaseFormat: yyyyMMdd
VersionPrefix: v
WhatIf: false
Debug: true
Verbose: true
WorkingDirectory: .github
Version: '[0.43.1]'
Prerelease: true
'@ | Set-Content -LiteralPath $settingsFilePath
"path=$settingsFilePath" | Add-Content -LiteralPath $env:GITHUB_OUTPUT

- name: Action-Test - Repository policy
uses: ./
with:
SettingsFilePath: ${{ steps.caller-settings.outputs.path }}
AutoCleanup: false
DatePrereleaseFormat: ''
VersionPrefix: ''
Debug: ''
Verbose: ''
WorkingDirectory: ''
Version: ''
Prerelease: ''
WhatIf: true

- name: Action-Test - Explicit standard-value override
uses: ./
with:
SettingsFilePath: ${{ steps.caller-settings.outputs.path }}
DefaultBump: patch
AutoCleanup: false
DatePrereleaseFormat: ''
VersionPrefix: ''
Debug: false
Verbose: false
WorkingDirectory: ${{ github.workspace }}
Version: '[0.43.1]'
Prerelease: false
WhatIf: true

- name: Remove caller settings
if: ${{ always() && steps.caller-settings.outputs.path != '' }}
shell: pwsh
env:
CALLER_SETTINGS_PATH: ${{ steps.caller-settings.outputs.path }}
run: Remove-Item -LiteralPath $env:CALLER_SETTINGS_PATH -ErrorAction Stop
11 changes: 5 additions & 6 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on:
pull_request:
pull_request_target: # zizmor: ignore[dangerous-triggers] trusted base checkout; writes labels and releases

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This publication-source gap remains open. The configuration correction leaves Release.yml unchanged from its starting head 714b801; it does not change publication authority or checkout selection. That work remains outside this assignment under #108, with #112 still a native blocker.

I will record this thread as an unresolved publication-readiness limit. PR 109 stays draft with auto-merge off. The read-only caller results do not establish safe production checkout or tag publication.

branches:
- main
types:
Expand All @@ -12,16 +12,15 @@ on:
- reopened
- synchronize
- labeled
paths:
- 'action.yml'
- 'src/**'
- unlabeled

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.merged && github.event.pull_request.base.ref || github.event.pull_request.number || github.ref }}
cancel-in-progress: false

permissions:
contents: write # Required to create releases
issues: write # Required to provision release labels
pull-requests: write # Required to create comments on the PRs
Comment thread
MariusStorhaug marked this conversation as resolved.
Resolved

jobs:
Expand Down
210 changes: 137 additions & 73 deletions README.md

Large diffs are not rendered by default.

164 changes: 97 additions & 67 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,124 +1,154 @@
name: Release GHRepository (by PSModule)
description: Automatically creates releases based on pull requests and labels.
description: Creates GitHub releases from owned pull-request labels and effective release settings.
author: PSModule
branding:
icon: upload-cloud
color: white

inputs:
AutoCleanup:
description: Control whether to automatically delete the prerelease tags after the stable release is created.
description: >-
Delete pull-request prereleases and their tags after the pull request closes.
Effective standard default: true.
required: false
default: 'true'
AutoPatching:
description: Control whether to automatically handle patches. If disabled, the action will only create a patch release if the pull request has a 'patch' label.
required: false
default: 'true'
ConfigurationFile:
description: The path to the configuration file. Settings in the configuration file take precedence over the action inputs.
SettingsFilePath:
description: >-
Select the repository settings file before startup. Relative paths use an explicit WorkingDirectory,
otherwise github.workspace. Nonempty named inputs override file values; omitted or empty inputs retain them.
required: false
default: .github\auto-release.yml
Comment thread
MariusStorhaug marked this conversation as resolved.
Resolved
DefaultBump:
description: >-
The release bump without an owned bump or skip label. Accepts exactly patch, minor, or major.
Effective standard default: patch. Omit or leave empty to follow repository policy.
required: false
CreateMajorTag:
description: Control whether to create a major tag when a pull request is merged into the main branch.
description: >-
Control whether to create a major tag when a pull request is merged into the main branch.
Effective standard default: true.
required: false
default: 'true'
CreateMinorTag:
description: Control whether to create a minor tag when a pull request is merged into the main branch.
description: >-
Control whether to create a minor tag when a pull request is merged into the main branch.
Effective standard default: true.
required: false
default: 'true'
DatePrereleaseFormat:
description: If specified, uses a date based prerelease scheme. The format should be a valid .NET format string like 'yyyyMMddHHmm'.
required: false
default: ''
IgnoreLabels:
description: A comma separated list of labels that do not trigger a release.
description: >-
Format the existing prerelease date suffix with a valid .NET format such as yyyyMMddHHmm.
Effective standard default: empty string (no date suffix).
required: false
default: NoRelease
IncrementalPrerelease:
description: Control whether to automatically increment the prerelease number. If disabled, the action will ensure only one prerelease exists for a given branch.
required: false
default: 'true'
MajorLabels:
description: A comma separated list of labels that trigger a major release.
required: false
default: major, breaking
MinorLabels:
description: A comma separated list of labels that trigger a minor release.
required: false
default: minor, feature
PatchLabels:
description: A comma separated list of labels that trigger a patch release.
description: >-
Automatically increment the prerelease number; when false, keep one prerelease for the branch.
Effective standard default: true.
required: false
default: patch, fix
UsePRTitleAsReleaseName:
description: When enabled, uses the pull request title as the name for the GitHub release.
description: >-
Use the pull request title as the GitHub release name.
Effective standard default: false.
required: false
default: 'false'
UsePRBodyAsReleaseNotes:
description: When enabled, uses the pull request body as the release notes for the GitHub release.
description: >-
Use the pull request body as GitHub release notes.
Effective standard default: true.
required: false
default: 'true'
UsePRTitleAsNotesHeading:
description: When enabled, the release notes will begin with the pull request title as a H1 heading followed by the pull request body. The title will reference the pull request number.
description: >-
Begin release notes with the pull request title and number as an H1 heading.
Effective standard default: true.
required: false
default: 'true'
VersionPrefix:
description: The prefix to use for the version number.
description: >-
Prefix the version number.
Effective standard default: v.
required: false
default: v
WhatIf:
description: If specified, the action will only log the changes it would make, but will not actually create or delete any releases or tags.
description: >-
Log planned label, release, tag, and comment changes without mutating repository state.
Effective standard default: false.
required: false
default: 'false'
Debug:
description: Enable debug output.
description: >-
Enable GitHub-Script debug output. Effective standard default: false.
required: false
default: 'false'
Verbose:
description: Enable verbose output.
description: >-
Enable GitHub-Script verbose output. Effective standard default: false.
required: false
default: 'false'
Version:
description: Specifies the version of the GitHub module to be installed. Accepts an exact version or a NuGet version range (for example '[1.2.0, 2.0.0)').
description: >-
Select the GitHub module dependency by exact version or NuGet version range, such as '[1.2.0, 2.0.0)'.
Effective standard default: empty string (latest dependency version).
required: false
Prerelease:
description: Allow prerelease versions if available.
description: >-
Allow prerelease versions of the GitHub module dependency. Effective standard default: false.
This does not select repository prerelease mode; use the release:prerelease label.
required: false
default: 'false'
WorkingDirectory:
description: The working directory where the script will run from.
description: >-
Set the execution directory before GitHub-Script starts. Relative values use github.workspace.
Effective standard default: github.workspace. A file-defined directory does not select another settings file.
required: false
default: ${{ github.workspace }}

runs:
using: composite
steps:
- name: Release-GHRepository
uses: PSModule/GitHub-Script@8083ec1f733f00357ee4d0db0c6056686e483bc0 # v1.9.0
- name: Resolve release settings
id: settings
shell: pwsh
working-directory: ${{ github.workspace }}
env:
PSMODULE_AUTO_RELEASE_ACTION_PATH: ${{ github.action_path }}
PSMODULE_AUTO_RELEASE_SETTING_METADATA: |
AutoCleanup: { Type: Boolean, Default: true, Phase: Release }
DefaultBump: { Type: Bump, Default: patch, Phase: Release }
CreateMajorTag: { Type: Boolean, Default: true, Phase: Release }
CreateMinorTag: { Type: Boolean, Default: true, Phase: Release }
DatePrereleaseFormat: { Type: DateTimeFormat, Default: '', Phase: Release }
IncrementalPrerelease: { Type: Boolean, Default: true, Phase: Release }
UsePRTitleAsReleaseName: { Type: Boolean, Default: false, Phase: Release }
UsePRBodyAsReleaseNotes: { Type: Boolean, Default: true, Phase: Release }
UsePRTitleAsNotesHeading: { Type: Boolean, Default: true, Phase: Release }
VersionPrefix: { Type: Text, Default: v, Phase: Release }
WhatIf: { Type: Boolean, Default: false, Phase: Release }
Debug: { Type: Boolean, Default: false, Phase: Startup }
Verbose: { Type: Boolean, Default: false, Phase: Startup }
WorkingDirectory: { Type: DirectoryPath, Default: '.', Phase: Startup }
Version: { Type: VersionConstraint, Default: '', Phase: Startup }
Prerelease: { Type: Boolean, Default: false, Phase: Startup }
PSMODULE_AUTO_RELEASE_INPUT_AutoCleanup: ${{ inputs.AutoCleanup }}
PSMODULE_AUTO_RELEASE_INPUT_AutoPatching: ${{ inputs.AutoPatching }}
PSMODULE_AUTO_RELEASE_INPUT_ConfigurationFile: ${{ inputs.ConfigurationFile }}
PSMODULE_AUTO_RELEASE_INPUT_SettingsFilePath: ${{ inputs.SettingsFilePath }}
PSMODULE_AUTO_RELEASE_INPUT_DefaultBump: ${{ inputs.DefaultBump }}
PSMODULE_AUTO_RELEASE_INPUT_CreateMajorTag: ${{ inputs.CreateMajorTag }}
PSMODULE_AUTO_RELEASE_INPUT_CreateMinorTag: ${{ inputs.CreateMinorTag }}
PSMODULE_AUTO_RELEASE_INPUT_DatePrereleaseFormat: ${{ inputs.DatePrereleaseFormat }}
PSMODULE_AUTO_RELEASE_INPUT_IgnoreLabels: ${{ inputs.IgnoreLabels }}
PSMODULE_AUTO_RELEASE_INPUT_IncrementalPrerelease: ${{ inputs.IncrementalPrerelease }}
PSMODULE_AUTO_RELEASE_INPUT_MajorLabels: ${{ inputs.MajorLabels }}
PSMODULE_AUTO_RELEASE_INPUT_MinorLabels: ${{ inputs.MinorLabels }}
PSMODULE_AUTO_RELEASE_INPUT_PatchLabels: ${{ inputs.PatchLabels }}
PSMODULE_AUTO_RELEASE_INPUT_UsePRBodyAsReleaseNotes: ${{ inputs.UsePRBodyAsReleaseNotes }}
PSMODULE_AUTO_RELEASE_INPUT_UsePRTitleAsReleaseName: ${{ inputs.UsePRTitleAsReleaseName }}
PSMODULE_AUTO_RELEASE_INPUT_UsePRTitleAsNotesHeading: ${{ inputs.UsePRTitleAsNotesHeading }}
PSMODULE_AUTO_RELEASE_INPUT_VersionPrefix: ${{ inputs.VersionPrefix }}
PSMODULE_AUTO_RELEASE_INPUT_WhatIf: ${{ inputs.WhatIf }}
PSMODULE_AUTO_RELEASE_INPUT_Debug: ${{ inputs.Debug }}
PSMODULE_AUTO_RELEASE_INPUT_Verbose: ${{ inputs.Verbose }}
PSMODULE_AUTO_RELEASE_INPUT_WorkingDirectory: ${{ inputs.WorkingDirectory }}
PSMODULE_AUTO_RELEASE_INPUT_Version: ${{ inputs.Version }}
PSMODULE_AUTO_RELEASE_INPUT_Prerelease: ${{ inputs.Prerelease }}
run: |
$null = & (Join-Path -Path $env:PSMODULE_AUTO_RELEASE_ACTION_PATH -ChildPath 'src\Initialize-ReleaseConfiguration.ps1')

- name: Release-GHRepository
uses: PSModule/GitHub-Script@8083ec1f733f00357ee4d0db0c6056686e483bc0 # v1.9.0
env:
PSMODULE_AUTO_RELEASE_ACTION_PATH: ${{ github.action_path }}
PSMODULE_AUTO_RELEASE_RESOLVED_SETTINGS: ${{ steps.settings.outputs.ReleaseSettings }}
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Debug: ${{ steps.settings.outputs.Debug }}
Prerelease: ${{ steps.settings.outputs.Prerelease }}
Verbose: ${{ steps.settings.outputs.Verbose }}
Version: ${{ steps.settings.outputs.Version }}
Name: Release-GHRepository
WorkingDirectory: ${{ inputs.WorkingDirectory }}
WorkingDirectory: ${{ steps.settings.outputs.WorkingDirectory }}
Script: |
# Release-GHRepository
${{ github.action_path }}/src/main.ps1
$releaseSettings = ConvertFrom-Json -InputObject $env:PSMODULE_AUTO_RELEASE_RESOLVED_SETTINGS
& (Join-Path -Path $env:PSMODULE_AUTO_RELEASE_ACTION_PATH -ChildPath 'src\main.ps1') -Settings $releaseSettings
Loading
Loading