Skip to content

Commit 6586030

Browse files
Revert "Require explicit non-PR release decisions"
This reverts commit 042e7b5.
1 parent 042e7b5 commit 6586030

5 files changed

Lines changed: 3 additions & 56 deletions

File tree

.github/actions/Resolve-PSModuleVersion/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ inputs:
3535
ReleaseDecision:
3636
description: Explicit decision for a direct push or workflow dispatch - release:patch, release:minor, release:major, or release:skip.
3737
required: false
38+
default: ''
3839

3940
outputs:
4041
Version:

.github/workflows/Plan.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ on:
5656
default: |
5757
^src/
5858
^README\.md$
59-
ReleaseDecision:
60-
type: string
61-
description: Explicit decision for a direct push or workflow dispatch.
62-
required: false
6359
6460
outputs:
6561
Settings:
@@ -124,7 +120,6 @@ jobs:
124120
Debug: ${{ inputs.Debug }}
125121
Verbose: ${{ inputs.Verbose }}
126122
WorkingDirectory: ${{ inputs.WorkingDirectory }}
127-
ReleaseDecision: ${{ inputs.ReleaseDecision }}
128123

129124
- name: Enrich-Settings
130125
# Merge the resolved version into the Settings object so all downstream jobs
@@ -139,25 +134,13 @@ jobs:
139134
RELEASE_TYPE: ${{ steps.Resolve-Version.outputs.ReleaseType }}
140135
CREATE_RELEASE: ${{ steps.Resolve-Version.outputs.CreateRelease }}
141136
run: |
142-
Import-Module -Name './_wf/.github/actions/Get-PSModuleSettings/src/Get-PSModuleSettings.Helpers.psm1' -Force
143-
144137
$settings = $env:SETTINGS | ConvertFrom-Json
145-
$releaseType = if ([string]::IsNullOrEmpty($env:RELEASE_TYPE)) { 'None' } else { $env:RELEASE_TYPE }
146-
$shouldPublish = $env:CREATE_RELEASE -eq 'true'
147-
148138
$settings.Publish.Module | Add-Member -MemberType NoteProperty -Name Resolution -Value ([pscustomobject]@{
149139
Version = $env:VERSION
150140
Prerelease = $env:PRERELEASE
151141
FullVersion = $env:FULL_VERSION
152-
ReleaseType = $releaseType
153-
CreateRelease = $shouldPublish
142+
ReleaseType = if ([string]::IsNullOrEmpty($env:RELEASE_TYPE)) { 'None' } else { $env:RELEASE_TYPE }
143+
CreateRelease = $env:CREATE_RELEASE -eq 'true'
154144
}) -Force
155-
$publishStateParams = @{
156-
Settings = $settings
157-
ReleaseType = $releaseType
158-
ShouldPublish = $shouldPublish
159-
}
160-
$settings = Resolve-PSModulePublishState @publishStateParams
161-
162145
$enriched = $settings | ConvertTo-Json -Depth 10 -Compress
163146
"Settings=$enriched" >> $env:GITHUB_OUTPUT

.github/workflows/Workflow-Test-Default.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ run-name: 'Workflow-Test [Default] - ${{ github.event_name }} [${{ github.event.
44

55
on:
66
workflow_dispatch:
7-
inputs:
8-
ReleaseDecision:
9-
description: Explicit release decision for this manual run.
10-
type: choice
11-
required: true
12-
options:
13-
- release:skip
14-
- release:patch
15-
- release:minor
16-
- release:major
177
push:
188
branches:
199
- main
@@ -72,12 +62,6 @@ jobs:
7262
^tests/srcTestRepo/
7363
^\.github/actions/
7464
^\.github/workflows/(?!Release\.yml$|Linter\.yml$)
75-
ReleaseDecision: >-
76-
${{
77-
github.event_name == 'workflow_dispatch' && inputs.ReleaseDecision ||
78-
github.event_name == 'push' && 'release:skip' ||
79-
''
80-
}}
8165
8266
VerifyRootFunctionsIndexDefault:
8367
if: github.event.action != 'closed'

.github/workflows/Workflow-Test-WithManifest.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ run-name: 'Workflow-Test [WithManifest] - ${{ github.event_name }} [${{ github.e
44

55
on:
66
workflow_dispatch:
7-
inputs:
8-
ReleaseDecision:
9-
description: Explicit release decision for this manual run.
10-
type: choice
11-
required: true
12-
options:
13-
- release:skip
14-
- release:patch
15-
- release:minor
16-
- release:major
177
push:
188
branches:
199
- main
@@ -72,12 +62,6 @@ jobs:
7262
^tests/srcWithManifestTestRepo/
7363
^\.github/actions/
7464
^\.github/workflows/(?!Release\.yml$|Linter\.yml$)
75-
ReleaseDecision: >-
76-
${{
77-
github.event_name == 'workflow_dispatch' && inputs.ReleaseDecision ||
78-
github.event_name == 'push' && 'release:skip' ||
79-
''
80-
}}
8165
8266
VerifyRootFunctionsIndexWithManifest:
8367
if: github.event.action != 'closed'

.github/workflows/workflow.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ on:
6767
default: |
6868
^src/
6969
^README\.md$
70-
ReleaseDecision:
71-
type: string
72-
description: Explicit decision for a direct push or workflow dispatch.
73-
required: false
7470
7571
permissions:
7672
contents: read # to checkout the repo
@@ -100,7 +96,6 @@ jobs:
10096
Version: ${{ inputs.Version }}
10197
WorkingDirectory: ${{ inputs.WorkingDirectory }}
10298
ImportantFilePatterns: ${{ inputs.ImportantFilePatterns }}
103-
ReleaseDecision: ${{ inputs.ReleaseDecision }}
10499

105100
# Runs on:
106101
# - ✅ Open/Updated PR - Lints code changes in active PRs

0 commit comments

Comments
 (0)