From a0b247aad8b24c06898b42d71e7772425fd45f11 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 02:54:24 +0000 Subject: [PATCH] Release workflow: create the tag on dispatch when it doesn't exist gh release create --target tags the dispatched commit, so a release can be cut from the Actions tab without pushing a tag first. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017ZHKbLKcpoa8QJGzqkbDTJ --- .github/workflows/release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8f3efd..0415cfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,15 +6,16 @@ on: workflow_dispatch: inputs: tag: - description: 'Existing tag to release and upload assets to (builds from the dispatched branch)' + description: 'Tag to release (created on the dispatched commit if missing); builds from the dispatched branch' required: true permissions: contents: write jobs: - # Creates the GitHub release for a pushed tag if it doesn't exist yet, so - # pushing a tag is all a release takes. Notes come from + # Creates the GitHub release if it doesn't exist yet, so pushing a tag (or + # dispatching this workflow with a new tag name, which then tags the + # dispatched commit) is all a release takes. Notes come from # docs/release-notes/.md when present, else GitHub's generated notes. release: name: Create release @@ -33,9 +34,9 @@ jobs: fi notes="docs/release-notes/$TAG.md" if [ -f "$notes" ]; then - gh release create "$TAG" --verify-tag --title "$TAG" --notes-file "$notes" + gh release create "$TAG" --target "$GITHUB_SHA" --title "$TAG" --notes-file "$notes" else - gh release create "$TAG" --verify-tag --title "$TAG" --generate-notes + gh release create "$TAG" --target "$GITHUB_SHA" --title "$TAG" --generate-notes fi windows: