From db78a9c0fab7467b2ea2342791308ffcffa30b05 Mon Sep 17 00:00:00 2001 From: Chris Petersen Date: Fri, 19 Jun 2026 15:57:25 -0700 Subject: [PATCH] ci: add "type a version in a box" dispatch (rust-gem-release@0.11.0) Bumps the rust-gem-release pin to @0.11.0 and wires the new optional version-box dispatch path: a maintainer can type a version in the Actions UI and the workflow bumps version.rb, commits, tags, and releases it in one run (no PAT, no double release). The tag-push CLI path and the dry-run-release PR path are unchanged. This PR does NOT bump the gem version. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2be759e..6fc06d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release # ============================================================================ # parsekit's release workflow — a thin caller of the shared reusable workflow -# scientist-labs/rust-gem-release (pinned @0.10.0, an explicit version pin — +# scientist-labs/rust-gem-release (pinned to an explicit version — see uses: below — # the moving-major alias is being retired). Modeled on the proven green template # (tokenkit/phrasekit/red-candle, all platforms green on rubygems.org). # @@ -42,6 +42,10 @@ on: - "v[0-9]+.[0-9]+.[0-9]+.*" workflow_dispatch: inputs: + version: + type: string + default: "" + description: "Version to cut + release, e.g. 1.0.0 (blank = build-only dry-run)" publish: type: boolean default: false @@ -63,7 +67,7 @@ jobs: # Normal PRs skip the expensive matrix; only a `dry-run-release` label opts in. # Tag pushes and manual dispatch always run. if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'dry-run-release') }} - uses: scientist-labs/rust-gem-release/.github/workflows/release.yml@0.10.0 + uses: scientist-labs/rust-gem-release/.github/workflows/release.yml@0.11.0 with: # gem-name == ext-name == gemspec basename == "parsekit", so ext-name and # gemspec resolve to their defaults and need not be passed. @@ -71,6 +75,9 @@ jobs: # NOTE: the constant is ParseKit (capital K), not Parsekit — the tag must # equal this command's output or the prepare job's tag==version guard fails. version-command: ruby -r./lib/parsekit/version -e 'print ParseKit::VERSION' + version: ${{ inputs.version }} + bump-command: | + sed -i 's/^\( *VERSION *= *\).*/\1"'"$VERSION"'"/' lib/parsekit/version.rb # parsekit.gemspec reads the generic default env var RUST_GEM_PLATFORM, so # platform-gem-env is left at its default and omitted. #