Skip to content

Commit e37c855

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 7c9c451 commit e37c855

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@ inputs:
77
description: Name of the module to publish.
88
required: false
99
ModulePath:
10-
description: Path to the folder containing the <Name>/ module subdirectory from Build-PSModule. Required only when CreateRelease is true.
10+
description: Path to the folder containing the <Name>/ module subdirectory from Build-PSModule. Required only when ReleaseType is not None.
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
@@ -62,14 +58,14 @@ runs:
6258
Install-PSResource -Name Microsoft.PowerShell.PSResourceGet -Repository PSGallery -TrustRepository
6359
6460
- name: Download module artifact
65-
if: inputs.CreateRelease == 'true'
61+
if: inputs.ReleaseType != 'None'
6662
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
6763
with:
6864
name: ${{ inputs.ArtifactName }}
6965
path: ${{ inputs.ModulePath }}
7066

7167
- name: Publish Module
72-
if: inputs.CreateRelease == 'true'
68+
if: inputs.ReleaseType != 'None'
7369
shell: pwsh
7470
working-directory: ${{ inputs.WorkingDirectory }}
7571
env:

.github/workflows/Publish-Module.yml

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

0 commit comments

Comments
 (0)