We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c017ec9 commit 0cf689bCopy full SHA for 0cf689b
1 file changed
scripts/main.ps1
@@ -280,10 +280,13 @@ LogGroup 'Calculate Job Run Conditions:' {
280
281
# Determine ReleaseType - single source of truth for what Publish-PSModule should do
282
# Values: 'Release', 'Prerelease', 'Cleanup', 'None'
283
+ # Release only happens when PR is merged into the default branch
284
$releaseType = if (-not $isPR) {
285
'None'
- } elseif ($isMergedPR) {
286
+ } elseif ($isMergedPR -and $isTargetDefaultBranch) {
287
'Release'
288
+ } elseif ($isMergedPR -and -not $isTargetDefaultBranch) {
289
+ 'None' # Merged to non-default branch - no release
290
} elseif ($isAbandonedPR) {
291
'Cleanup'
292
} elseif ($shouldPrerelease) {
0 commit comments