🚀 [Feature]: Separate cleanup from release type and move ReleaseType to Publish.Module (#8)
The release type calculation is now separated from cleanup logic, providing clearer control over when prereleases are cleaned up. The ReleaseType now only has three values (Release, Prerelease, or None), and cleanup is computed independently based on the AutoCleanup setting.
- Part of PSModule/Process-PSModule#73
- Part of PSModule/Process-PSModule#265
ReleaseType simplified to three values
Previously, ReleaseType could be set to Cleanup to trigger prerelease cleanup. Now, ReleaseType only has three values: Release, Prerelease, or None. The cleanup decision is computed separately based on:
- Whether you're in a cleanup scenario (merging to main or abandoning a PR)
- Whether
AutoCleanupis enabled in your settings (defaults totrue)
This separation enables the abandoned PR cleanup scenario where a PR is closed without merging—the workflow can now trigger cleanup independently of whether a release is being created.
ReleaseType moved to Publish.Module output
The computed ReleaseType value is now stored in Publish.Module.ReleaseType rather than in the Run object. This organizes release-related computed values alongside other publish settings.
Workflows should now reference:
fromJson(inputs.Settings).Publish.Module.ReleaseTypefor the release typefromJson(inputs.Settings).Publish.Module.AutoCleanupfor the cleanup decision (computed boolean)
AutoCleanup behavior
The AutoCleanup setting continues to work as before, but the output value is now a computed boolean that indicates whether cleanup should actually occur (based on both the setting and the current context like merged PR or abandoned PR).