Skip to content

[Feature]: Add ReleaseType input to Publish-PSModule for explicit release control #265

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 prerelease label

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 release
  • Prerelease - Create a prerelease
  • Cleanup - Delete old prereleases
  • None - Do not create any release

When set, this input overrides the automatic detection logic.

Implementation

This change affects PSModule/Publish-PSModule:

  • Add ReleaseType input to action.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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions