Skip to content

Commit e7cb777

Browse files
refactor(workflow): replace isPrerelease with force input (#186)
## Summary Aligns with PowerShellOrg/.github#12. - Removes `isPrerelease` dispatch input and `with:` pass-through — the reusable workflow now infers prerelease from `PSData.Prerelease` in the manifest automatically - Adds `force` dispatch input to bypass the PSGallery existence check when re-triggering a failed job ## Re-trigger pattern If `create_release` succeeds but `publish` fails (e.g. expired secret), re-trigger with: `force=true, create_release=false, publish=true` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1d04ec3 commit e7cb777

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99
description: "The version to publish. Leave empty to use the version in the module manifest."
1010
required: false
1111
type: string
12-
isPrerelease:
13-
description: "Is this a prerelease version?"
12+
force:
13+
description: "If true, bypass the PSGallery version existence check. Use when re-triggering a failed publish job (pattern: force=true, create_release=false, publish=true)."
1414
required: false
1515
type: boolean
1616
default: false
@@ -19,6 +19,16 @@ on:
1919
required: false
2020
type: boolean
2121
default: false
22+
create_release:
23+
description: "If false, skip creating the GitHub release and tag."
24+
required: false
25+
type: boolean
26+
default: true
27+
publish:
28+
description: "If false, skip publishing to PowerShell Gallery."
29+
required: false
30+
type: boolean
31+
default: true
2232
permissions:
2333
contents: write
2434
jobs:
@@ -27,6 +37,8 @@ jobs:
2737
uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
2838
with:
2939
version: ${{ inputs.version || '' }}
30-
isPrerelease: ${{ inputs.isPrerelease || false }}
40+
force: ${{ inputs.force || false }}
3141
dry_run: ${{ inputs.dry_run || false }}
42+
create_release: ${{ github.event_name != 'workflow_dispatch' || inputs.create_release }}
43+
publish: ${{ github.event_name != 'workflow_dispatch' || inputs.publish }}
3244
secrets: inherit

0 commit comments

Comments
 (0)