Skip to content

Update checkout action to use 'main' branch#5

Merged
gabewillen merged 2 commits into
mainfrom
fix/create-release
Nov 14, 2025
Merged

Update checkout action to use 'main' branch#5
gabewillen merged 2 commits into
mainfrom
fix/create-release

Conversation

@gabewillen

@gabewillen gabewillen commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Description

The release-tag workflow previously ran on a detached HEAD, causing tags to be created on commits that were not associated with the main branch. GitHub only triggers push.tags workflows when the tag points to a branch-backed commit, so the Release workflow never executed.

This PR updates the checkout step to explicitly check out main, ensuring all created tags correctly trigger the Release pipeline.

Related Issues

Fixes the issue where automated tags did not trigger the Release workflow.

Closes #

Type of Change

  • 🔧 Build/CI configuration change

Changes Made

  • Added ref: main to the actions/checkout step in the Create Release workflow.
  • Ensured all release tags are created on an actual branch instead of a detached HEAD.
  • Restored expected behavior where push.tags events trigger the Release job.

Testing

  • Manual testing performed
  • Verified the workflow now checks out main
  • Confirmed that pushing an automated tag triggers the Release workflow

Test Evidence

✓ HEAD is now on refs/heads/main
✓ Tag creation attaches to latest main commit
✓ Tag push triggers Release workflow as expected

Documentation

  • Updated API documentation
  • Updated README.md
  • Updated CHANGELOG.md
  • Added comments where necessary
  • Updated examples

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Adequate comments added
  • No new warnings introduced
  • Documentation updated as needed
  • Compatible with supported platforms

Breaking Changes

N/A

Performance Impact

  • No performance impact

Additional Context

This fixes the core issue behind the Release workflow failing to run after automated tag creation. Tagging now behaves exactly as expected.

Reviewer Notes

Please confirm that the workflow now reliably checks out main and that tag-triggered runs work end-to-end.


Note

Update Create Release workflow to explicitly check out main and remove the skip_validation input.

  • CI/CD — .github/workflows/create-release.yml:
    • Checkout: Set actions/checkout to ref: main.
    • Inputs: Remove workflow_dispatch input skip_validation.

Written by Cursor Bugbot for commit 28220a0. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings November 14, 2025 04:54
Comment thread .github/workflows/create-release.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Create Release workflow to explicitly check out the main branch instead of running on a detached HEAD state, ensuring that created tags are properly associated with a branch and trigger the downstream Release workflow.

  • Modified the checkout step to explicitly reference the main branch
  • Ensures tags created by the workflow point to branch-backed commits
  • Addresses the issue where push.tags events were not triggering the Release workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/create-release.yml
Removed skip_validation input from create-release workflow.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Flawed Workflow Validation Causes Confusion

The "Validate branch" step references inputs.skip_validation which was removed from the workflow inputs, causing the conditional to always evaluate to true. Additionally, this validation is now redundant since the checkout step hardcodes ref: main, making it impossible to check out any other branch. The error message mentioning enabling skip validation is also misleading since that option no longer exists.

.github/workflows/create-release.yml#L67-L76

- name: Validate branch
if: ${{ !inputs.skip_validation }}
run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$CURRENT_BRANCH" != "main" ]; then
echo "Error: Not on main branch (current: $CURRENT_BRANCH)"
echo "To release from a different branch, enable 'Skip branch validation'"
exit 1
fi

Fix in Cursor Fix in Web


@gabewillen gabewillen merged commit daf94d0 into main Nov 14, 2025
17 checks passed
gabewillen added a commit that referenced this pull request Nov 17, 2025
* Update checkout action to use 'main' branch

* Remove skip_validation option from release workflow

Removed skip_validation input from create-release workflow.
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