Skip to content

Commit d5631d5

Browse files
Use ReleaseType as publish gate
Remove CreateRelease input and gate publish steps directly on ReleaseType so None means no release flow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent fd33c37 commit d5631d5

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

.github/actions/Publish-PSModule/action.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ inputs:
1010
description: Path to the folder containing the <Name>/ module subdirectory from Build-PSModule.
1111
required: false
1212
default: outputs/module
13-
CreateRelease:
14-
description: When true, downloads the module artifact and runs publish.ps1 (PowerShell Gallery + GitHub Release flow).
15-
required: false
16-
default: 'false'
1713
ReleaseType:
1814
description: Resolved release type from settings (Release, Prerelease, None). Used to control prerelease cleanup behavior.
1915
required: false
@@ -58,14 +54,14 @@ runs:
5854
Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository
5955
6056
- name: Download module artifact
61-
if: inputs.CreateRelease == 'true'
57+
if: inputs.ReleaseType != 'None'
6258
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
6359
with:
6460
name: ${{ inputs.ArtifactName }}
6561
path: ${{ inputs.ModulePath }}
6662

6763
- name: Publish Module
68-
if: inputs.CreateRelease == 'true'
64+
if: inputs.ReleaseType != 'None'
6965
shell: pwsh
7066
working-directory: ${{ inputs.WorkingDirectory }}
7167
env:

.github/workflows/Publish-Module.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
with:
4646
Name: ${{ fromJson(inputs.Settings).Name }}
4747
ModulePath: outputs/module
48-
CreateRelease: ${{ fromJson(inputs.Settings).Module.CreateRelease }}
4948
ReleaseType: ${{ fromJson(inputs.Settings).Module.ReleaseType }}
5049
APIKey: ${{ secrets.APIKey }}
5150
WhatIf: ${{ github.repository == 'PSModule/Process-PSModule' }}

0 commit comments

Comments
 (0)