Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Problem

The release workflow fails when triggered via workflow_dispatch with a tag that doesn't exist yet:

Run # For workflow_dispatch, we need to checkout the specific tag
Error: Tag 'v2.24.1-alpha' does not exist. Create the tag first before running this workflow.
Error: Process completed with exit code 1.

This requires manual tag creation before workflow execution, breaking automation flow.

Solution

Modified .github/workflows/release.yml to automatically create the specified tag if it doesn't exist when triggered via workflow_dispatch.

Changes

  • Step "Release - Checkout or create tag for workflow_dispatch" (lines 61-75):
    • Existing behavior preserved: checks out existing tags
    • New behavior: creates tag at current HEAD and pushes to origin if tag doesn't exist
    • Leverages existing contents: write permission (no permission changes needed)

Workflow Behavior

Before:

if tag exists: checkout tag
else: exit 1 with error

After:

if tag exists: checkout tag
else: create tag at HEAD && push tag

The workflow now seamlessly handles both scenarios:

  • Tag exists: Standard release from existing tag (unchanged)
  • Tag missing: Creates tag, then proceeds with release (new capability)

This eliminates pre-release tag creation as a manual prerequisite for workflow_dispatch triggers.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare for v2.24.1 release Auto-create missing tags in release workflow when triggered via workflow_dispatch Feb 10, 2026
Copilot AI requested a review from data-douser February 10, 2026 03:18
@data-douser
Copy link
Collaborator

Superseded by #40

@data-douser data-douser deleted the copilot/sub-pr-38 branch February 11, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants