Skip to content

Conversation

@MariusStorhaug
Copy link
Member

The workflow now supports configurable prerelease labels and introduces ReleaseType as a single source of truth for determining what action the publish workflow should take. Previously, the prerelease label check was hardcoded while all other labels were configurable, and adding a prerelease label to a PR did not trigger the publish workflow.

PrereleaseLabels Configuration

You can now customize which labels trigger a prerelease build via the PSModule.yml settings file:

Publish:
  Module:
    PrereleaseLabels: prerelease, beta, alpha

The default value is prerelease, maintaining backward compatibility.

ReleaseType - Single Source of Truth

A new ReleaseType property is now calculated and included in the Run object with these values:

Value Trigger Action
Release PR merged to default branch Create stable release
Prerelease PR has prerelease label OR prerelease label just added Create prerelease
Cleanup PR closed without merge (abandoned) Delete old prereleases
None Any other scenario Skip publishing

This simplifies the publish logic and makes debugging easier since ReleaseType is visible in the Get-Settings logs.

Changes

  • Added PrereleaseLabels setting with default value prerelease
  • Added detection for when a prerelease label is added via the labeled action
  • Introduced ReleaseType calculation as the single source of truth
  • Updated PublishModule condition to use $releaseType -ne 'None'
  • Added ReleaseType to the Run object for downstream consumption
  • Updated JSON schema with PrereleaseLabels and ReleaseType definitions

Copilot AI review requested due to automatic review settings January 18, 2026 00:23
Copy link
Contributor

Copilot AI left a 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 adds support for configurable prerelease labels and introduces a ReleaseType property as a single source of truth for determining publish workflow actions. Previously, the prerelease label check was hardcoded, and the workflow logic was scattered across multiple conditions.

Changes:

  • Added PrereleaseLabels configuration setting with default value prerelease
  • Introduced ReleaseType calculation to determine workflow actions ('Release', 'Prerelease', 'Cleanup', or 'None')
  • Updated publish logic to use the centralized ReleaseType property

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/main.ps1 Added PrereleaseLabels configuration, implemented prerelease label detection logic, introduced ReleaseType calculation, and updated Run conditions
scripts/Settings.schema.json Added schema definitions for PrereleaseLabels setting and ReleaseType property

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MariusStorhaug MariusStorhaug merged commit 3b93ae6 into main Jan 18, 2026
16 checks passed
@MariusStorhaug MariusStorhaug deleted the prerelease-support branch January 18, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants