From 128a9c57987bfdcdbd0e5541b7cd229aeb6b9ec3 Mon Sep 17 00:00:00 2001 From: Christian Bager Bach Houmann Date: Sat, 24 Oct 2026 15:21:59 +0200 Subject: [PATCH] feat(templates): add a dryRun dispatch input to the prepare caller stub --- README.md | 14 +++++++------- templates/caller-workflows/release-prepare.yml | 11 ++++++++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d9ee8b1..cfef72c 100644 --- a/README.md +++ b/README.md @@ -272,12 +272,12 @@ control and can be made a branch-protection bypass actor. Per repo: ### Dry-run smoke test Before a repo's first real release, dispatch the **Prepare release** workflow -manually (Actions -> Prepare release -> Run workflow) with `dry-run: true` wired in -the stub, or temporarily uncomment `# dry-run: true`. The plan job computes the -version and notes and uploads them as an artifact; the open-PR job is skipped, so -nothing is pushed and no App call is made (dummy `app-id` / slug are fine for a -pure planning check). Confirm the planned version and notes look right, then remove -the dry-run. +manually (Actions -> Prepare release -> Run workflow) with **dryRun** checked. The +stub forwards it as the reusable workflow's `dry-run` input. The plan job computes +the version and notes and uploads them as an artifact; the open-PR job is skipped, +so nothing is pushed and no App call is made (dummy `app-id` / slug are fine for a +pure planning check). Confirm the planned version and notes look right. Dispatch +with `dryRun` again any time to preview the next release. ### Recovery @@ -339,7 +339,7 @@ workflow state. `refs/heads/release/`, so a stray branch blocks the pipeline's branch creation. Prepare and validate preflight this and fail with an actionable message, but deleting the stray up front saves a failed run. -5. Smoke-test with `dry-run: true`, then push a conventional commit to the default +5. Smoke-test by dispatching **Prepare release** with `dryRun` checked, then push a conventional commit to the default branch and merge the release PR the bot opens. ## Pinned action versions diff --git a/templates/caller-workflows/release-prepare.yml b/templates/caller-workflows/release-prepare.yml index b22b7f2..7f79ede 100644 --- a/templates/caller-workflows/release-prepare.yml +++ b/templates/caller-workflows/release-prepare.yml @@ -6,8 +6,8 @@ # to the reusable prepare workflow, which re-confirms the SHA is still the # default-branch head and opens/refreshes the standing release PR. # -# Escape hatch: workflow_dispatch lets you plan manually (e.g. a dry-run smoke -# test before your first release) without waiting for a CI completion. +# Escape hatch: workflow_dispatch lets you plan manually without waiting for a +# CI completion. Set dryRun to plan without opening or refreshing the release PR. name: Prepare release @@ -22,6 +22,11 @@ on: description: "Commit SHA to plan from (defaults to the default-branch head)" required: false type: string + dryRun: + description: "Plan only: compute the version and notes, open no release PR" + required: false + type: boolean + default: false permissions: {} @@ -53,6 +58,6 @@ jobs: target-sha: ${{ github.event.workflow_run.head_sha || inputs.targetSha }} release-bot-app-slug: podnotes-release-bot app-id: ${{ vars.RELEASE_APP_ID }} - # dry-run: true # plan only; skip opening the PR (smoke test) + dry-run: ${{ inputs.dryRun == true }} secrets: release-app-private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}