From f3caccbe6ff95608a153cd6748cb63ac7ee25bfc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 11 Jun 2026 10:08:58 +0000 Subject: [PATCH] ci: let the release workflow be cut by manual dispatch workflow_dispatch now takes a tag input and the release step creates the tag + release itself (softprops does both when the tag doesn't exist), so a release can be cut from environments that can merge PRs but cannot push tags. Tag pushes behave exactly as before. https://claude.ai/code/session_012HBi5A2gpLS8WzurJfqUG3 --- .github/workflows/release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14a73b1..1400a07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,13 @@ name: Release on: push: tags: ["v*"] - workflow_dispatch: {} + # Manual runs create the tag + release themselves (used by environments that + # can build PRs but cannot push tags). The version must match Cargo.toml. + workflow_dispatch: + inputs: + tag: + description: "Release tag to create (e.g. v0.2.0)" + required: true permissions: contents: write @@ -39,7 +45,11 @@ jobs: run: tar -C target/${{ matrix.target }}/release -czf tuiui-${{ matrix.target }}.tar.gz tuiui - name: Attach to release - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' uses: softprops/action-gh-release@v2 with: + # On dispatch this creates the tag (at the run's commit) and the + # release; on a tag push it attaches to the existing tag's release. + tag_name: ${{ github.event.inputs.tag || github.ref_name }} + body: "See CHANGELOG.md for the full release notes." files: tuiui-${{ matrix.target }}.tar.gz