From c71354e164843b77efd842ec9deee7ce5c568c21 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sat, 30 May 2026 09:12:48 -0700 Subject: [PATCH 1/3] refactor(workflow): replace isPrerelease with force input Aligns with PowerShellOrg/.github#12 which removes isPrerelease (now inferred from PSData.Prerelease in the manifest) and adds force to bypass the PSGallery existence check when re-triggering a failed job. Re-trigger pattern: force=true, create_release=false, publish=true Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 68578ca..9e8d910 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,8 +9,8 @@ on: description: "The version to publish. Leave empty to use the version in the module manifest." required: false type: string - isPrerelease: - description: "Is this a prerelease version?" + force: + 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)." required: false type: boolean default: false @@ -27,6 +27,6 @@ jobs: uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main with: version: ${{ inputs.version || '' }} - isPrerelease: ${{ inputs.isPrerelease || false }} + force: ${{ inputs.force || false }} dry_run: ${{ inputs.dry_run || false }} secrets: inherit From 9e2f3498383b8b76bb6cc188a2a84475e1eb28ce Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sat, 30 May 2026 09:15:23 -0700 Subject: [PATCH 2/3] fix(workflow): expose create_release and publish as dispatch inputs Required to actually use the force re-trigger pattern documented in the previous commit. Without these inputs, operators could not set create_release=false when re-triggering a failed publish job. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9e8d910..f3700b3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,16 @@ on: required: false type: boolean default: false + create_release: + description: "If false, skip creating the GitHub release and tag." + required: false + type: boolean + default: true + publish: + description: "If false, skip publishing to PowerShell Gallery." + required: false + type: boolean + default: true permissions: contents: write jobs: @@ -29,4 +39,6 @@ jobs: version: ${{ inputs.version || '' }} force: ${{ inputs.force || false }} dry_run: ${{ inputs.dry_run || false }} + create_release: ${{ inputs.create_release != false }} + publish: ${{ inputs.publish != false }} secrets: inherit From 606173c310cdbe12f23b18bf0f637a940a7483c0 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sat, 30 May 2026 09:17:46 -0700 Subject: [PATCH 3/3] fix(workflow): default create_release and publish to true on push events inputs context is empty on non-dispatch triggers; the previous `!= false` expression evaluated empty as equal to false under GitHub Actions loose comparison, skipping both jobs on push. Use `github.event_name != 'workflow_dispatch' || inputs.X` instead: short-circuits to true on push, falls through to the explicit input value on dispatch. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3700b3..ace622f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,6 +39,6 @@ jobs: version: ${{ inputs.version || '' }} force: ${{ inputs.force || false }} dry_run: ${{ inputs.dry_run || false }} - create_release: ${{ inputs.create_release != false }} - publish: ${{ inputs.publish != false }} + create_release: ${{ github.event_name != 'workflow_dispatch' || inputs.create_release }} + publish: ${{ github.event_name != 'workflow_dispatch' || inputs.publish }} secrets: inherit