-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Summary
Add a new ReleaseType input parameter to Publish-PSModule action that allows users to explicitly specify the type of release to create, overriding the automatic detection based on PR state and labels.
Motivation
Currently, the release type is automatically determined based on:
- Whether the PR is merged
- Whether the target is the default branch
- Whether the PR has a
prereleaselabel
There are scenarios where users need more control over the release process, such as:
- Forcing a specific release type in CI/CD pipelines
- Testing release workflows without relying on label-based detection
- Integration with other tools that determine release type externally (e.g.,
Get-PSModuleSettings)
Proposed Solution
Add a ReleaseType input with the following valid values:
Release- Create a stable releasePrerelease- Create a prereleaseCleanup- Delete old prereleasesNone- Do not create any release
When set, this input overrides the automatic detection logic.
Implementation
This change affects PSModule/Publish-PSModule:
- Add
ReleaseTypeinput toaction.yml - Pass environment variable to PowerShell script
- Update release type calculation to use the input when provided
- Simplify the event information logging (remove redundant PR state checks)
Related
- Part of the broader release notes configuration work in 🚀 [Feature]: Add PR Title and Description as Configurable Release Notes #263