🚀 [Feature]: Version output always emitted regardless of publish decision (#4)
The action now always emits a valid Version and FullVersion output, even when no release will be created. Non-publishable builds receive a development prerelease version so downstream jobs always have a version to stamp into the artifact.
New: Development prerelease version for non-publishable builds
When ShouldPublish is false, the action now emits a development prerelease version (e.g. 1.2.4-mybranch001) instead of empty strings. The CreateRelease output remains false — downstream jobs continue to use this flag to gate publishing.
When ShouldPublish is true, behavior is unchanged.
Technical Details
- Moved version resolution (GitHub releases + PSGallery query) outside the
ShouldPublishconditional so it always executes. - When
ShouldPublishisfalse, the existingGet-NextModuleVersionis called with a forced patch bump and the branch-based prerelease tag (reusing existingIncrementalPrerelease/DatePrereleaseFormatlogic). - Made
Write-ActionOutput'sNewVersionparameter mandatory (always receives a value now). - Added Pester tests covering all non-publish scenarios and existing bump behavior.
- Implementation plan progress: Core changes and Tests tasks in PSModule/Process-PSModule#348 completed; Validation task remains.