Skip to content

v1.2.0

Choose a tag to compare

@github-actions github-actions released this 18 Jan 00:49
· 7 commits to main since this release
3b93ae6

🚀 [Feature]: Add PrereleaseLabels support and ReleaseType calculation (#6)

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