v1.2.0
🚀 [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, alphaThe 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
PrereleaseLabelssetting with default valueprerelease - Added detection for when a prerelease label is added via the
labeledaction - Introduced
ReleaseTypecalculation as the single source of truth - Updated
PublishModulecondition to use$releaseType -ne 'None' - Added
ReleaseTypeto theRunobject for downstream consumption - Updated JSON schema with
PrereleaseLabelsandReleaseTypedefinitions