Skip to content

Commit ef24468

Browse files
refactor(workflow): add dispatch inputs and replace isPrerelease with force (#468)
## Summary Aligns with PowerShellOrg/.github#12. - Adds `version`, `force`, and `dry_run` to `workflow_dispatch` inputs (previously no manual inputs were exposed) - `force` bypasses the PSGallery existence check when re-triggering a failed job — previously there was no way to do this without a code change ## 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 0a829a5 commit ef24468

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,41 @@ on:
33
push:
44
tags: ['v*']
55
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "The version to publish. Leave empty to use the version in the module manifest."
9+
required: false
10+
type: string
11+
force:
12+
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)."
13+
required: false
14+
type: boolean
15+
default: false
16+
dry_run:
17+
description: "If true, skip actual publishing and just validate the workflow logic."
18+
required: false
19+
type: boolean
20+
default: false
21+
create_release:
22+
description: "If false, skip creating the GitHub release and tag."
23+
required: false
24+
type: boolean
25+
default: true
26+
publish:
27+
description: "If false, skip publishing to PowerShell Gallery."
28+
required: false
29+
type: boolean
30+
default: true
631

732
jobs:
833
release:
934
uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
1035
with:
1136
module-name: Plaster
37+
version: ${{ inputs.version || '' }}
38+
force: ${{ inputs.force || false }}
39+
dry_run: ${{ inputs.dry_run || false }}
40+
create_release: ${{ github.event_name != 'workflow_dispatch' || inputs.create_release }}
41+
publish: ${{ github.event_name != 'workflow_dispatch' || inputs.publish }}
1242
secrets:
1343
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}

0 commit comments

Comments
 (0)