Skip to content

Fix release workflow not triggered after tag push#3

Merged
cdanis merged 2 commits intomainfrom
copilot/debug-release-action-trigger
Jan 12, 2026
Merged

Fix release workflow not triggered after tag push#3
cdanis merged 2 commits intomainfrom
copilot/debug-release-action-trigger

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 12, 2026

Fixes the issue where the release workflow was not being triggered after the create-release-tag workflow pushed a tag.

Problem

When a GitHub Actions workflow uses GITHUB_TOKEN to push a tag, it doesn't trigger other workflows that listen to tag push events. This is a GitHub security feature to prevent recursive workflow triggers.

Solution

Modified the workflows to use workflow_call for direct workflow invocation instead of relying on tag push events to trigger the release workflow.

Changes Made

  • release.yml: Added workflow_call trigger with a tag input parameter, allowing it to be called directly by other workflows
  • release.yml: Added tag determination logic to handle both tag push events and workflow_call invocations
  • create-release-tag.yml: Added a second job (trigger-release) that directly calls the release workflow after successfully creating a tag
  • Updated all references to github.ref_name to use the dynamically determined tag output

How It Works

  1. The create-release-tag workflow creates and pushes the tag
  2. A second job in the same workflow directly invokes the release workflow using workflow_call
  3. The release workflow receives the tag name as an input parameter
  4. The release workflow builds, tests, and creates the GitHub release with artifacts

Benefits

  • Release workflow now triggers reliably when using the "Create Release Tag" workflow
  • Release workflow still works with manual tag pushes from outside GitHub Actions
  • Clean separation of concerns with proper error handling
  • Release only triggers if tag creation succeeds

Testing

To test this fix:

  1. Update the version in package.json to a new version
  2. Run the "Create Release Tag" workflow manually from the Actions tab
  3. Verify that both the create-tag job and trigger-release job complete successfully
  4. Confirm that a GitHub release is created with the built artifacts
Original prompt

Something didn't work about #2. The logs say the tag push succeeded, but no release actions were triggered


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

@cdanis
Copy link
Copy Markdown
Owner

cdanis commented Jan 12, 2026

@copilot try again lol

- Add workflow_call trigger to release.yml to allow being called by other workflows
- Update create-release-tag.yml to directly call release workflow after creating tag
- Add tag determination step in release workflow to handle both tag push and workflow_call events
- Update all references to github.ref_name to use the determined tag output
- This fixes the issue where GITHUB_TOKEN doesn't trigger workflows on tag push

Co-authored-by: cdanis <1160935+cdanis@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 12, 2026

@copilot try again lol

Fixed in bc326e5!

The issue was that GITHUB_TOKEN doesn't trigger other workflows when pushing tags (GitHub security feature).

The solution:

  • Modified release.yml to accept workflow_call trigger with a tag input parameter
  • Updated create-release-tag.yml to directly call the release workflow after creating the tag
  • Added tag determination logic to handle both tag push events and workflow_call events

Now when you run "Create Release Tag", it will:

  1. Create and push the tag
  2. Immediately trigger the release workflow with the tag name

The release workflow still works with manual tag pushes from outside workflows too.

Copilot AI changed the title [WIP] Fix release actions not triggered after tag push Fix release workflow not triggered after tag push Jan 12, 2026
@cdanis cdanis marked this pull request as ready for review January 12, 2026 22:40
@cdanis cdanis merged commit cfd784f into main Jan 12, 2026
3 checks passed
@cdanis
Copy link
Copy Markdown
Owner

cdanis commented Jan 12, 2026

@copilot instrad of just bailing in the tag exists, check if the release exists and trigger release if not

@cdanis cdanis deleted the copilot/debug-release-action-trigger branch January 13, 2026 00:56
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