-
Notifications
You must be signed in to change notification settings - Fork 0
🚀 [Feature]: Add ReleaseType input for explicit release control #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ReleaseType input for explicit release control
ReleaseType input for explicit release controlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new ReleaseType input parameter that provides explicit control over release creation, replacing the previous automatic detection based on pull request state and branch information. The feature enables callers (typically Get-PSModuleSettings) to specify whether to create a Release, Prerelease, Cleanup, or None.
Changes:
- Added
ReleaseTypeinput parameter to action.yml with default value 'Release' - Removed automatic detection logic for release types based on PR state, merge status, and target branch
- Added validation for the ReleaseType parameter with support for four values: Release, Prerelease, Cleanup, None
- Updated logging to display ReleaseType instead of PR state details
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| action.yml | Adds ReleaseType input parameter definition and environment variable mapping |
| scripts/helpers/Publish-PSModule.ps1 | Replaces automatic release type detection with explicit ReleaseType input handling and validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ng related variables for clarity
…le/Publish-PSModule into feature/releasetype-input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…anup and update related logic
…ng PUBLISH_CONTEXT_PrereleaseName
… as it is in init
…ror handling and clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ewVersion and refactor manifest validation region
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The action now supports explicit control over the release type through the new
ReleaseTypeinput parameter. You can specify whether to create a stable release, prerelease, or skip releasing entirely—without relying on automatic detection from PR state and labels. The workflow has also been restructured into three phases (initialization, publishing, cleanup) that run conditionally, improving efficiency when only cleanup is needed.New ReleaseType input parameter
A new
ReleaseTypeinput allows you to explicitly control the release behavior:ReleasePrereleaseNoneThis input is designed to work with
Get-PSModuleSettings, which pre-calculates the appropriate release type based on your workflow context:Restructured workflow execution
The action now runs in three separate phases, each executing only when needed:
init.ps1) – Calculates version, validates inputs, and stores context in environment variablespublish.ps1) – Downloads artifact, updates manifest, publishes to PSGallery, and creates GitHub release (runs only whenShouldPublishis true)cleanup.ps1) – Deletes old prerelease tags (runs only whenShouldCleanupis true)This separation means the action skips unnecessary steps. For example, when a PR is closed without merging, the workflow can run cleanup independently without downloading artifacts or attempting to publish.
Backward compatibility
The
ReleaseTypeparameter defaults toRelease, maintaining current behavior for merged PRs targeting the default branch. Existing workflows continue to work without modification.