Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

The changesets workflow job was failing because changeset.js attempted to create a git tag that the release job had already created, resulting in fatal: tag already exists.

Workflow sequence

The release workflow now runs jobs in the following order:

  1. release job: Computes version → creates tag → builds binaries → creates GitHub release
  2. agent job: Generates release highlights
  3. changesets job: Runs changeset.js → updates CHANGELOG → commits

Changes

Script Changes

  • Removed git tag -a command from changeset.js
  • Removed git push origin <tag> command from changeset.js
  • Updated error recovery instructions to exclude tag operations
  • Added documentation note that tags must be pre-created by caller

The script now only updates CHANGELOG.md, deletes changeset files, commits changes, and pushes to main—no tag operations.

Workflow Changes

  • Updated changesets job dependencies to include agent job
  • The changesets job now runs after the agent job completes, ensuring release highlights are generated before the CHANGELOG is updated

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing

Original prompt

Fix the failing GitHub Actions workflow changesets
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.

The script changeset.js SHOULD NOT TRY TO CREATE A TAG. It receives a tag that already exists.

Job ID: 62405913951
Job URL: https://github.com/github/gh-aw/actions/runs/21648017836/job/62405913951

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


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

The changeset.js script was trying to create a git tag that already exists,
causing the GitHub Actions workflow to fail. The workflow's release job creates
the tag first, then the changesets job calls changeset.js which tried to create
the same tag again.

Changes:
- Removed tag creation (git tag -a) from changeset.js
- Removed tag push (git push origin <tag>) from changeset.js
- Updated error recovery instructions to not mention tag operations
- Added documentation clarifying the script expects tags to be pre-created

The script now only updates CHANGELOG.md, deletes changeset files, commits
changes, and pushes to main - no tag operations.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for changesets Remove duplicate tag creation from changeset.js Feb 3, 2026
Copilot AI requested a review from pelikhan February 3, 2026 21:33
@pelikhan
Copy link
Contributor

pelikhan commented Feb 3, 2026

Copilot, update the needs for the changelog job so it runs after the agent job and depends on the agent job.

@pelikhan
Copy link
Contributor

pelikhan commented Feb 3, 2026

@copilot, update the needs for the changelog job so it runs after the agent job and depends on the agent job.

@pelikhan pelikhan marked this pull request as ready for review February 3, 2026 22:26
Copilot AI review requested due to automatic review settings February 3, 2026 22:26
Copy link
Contributor

Copilot AI left a comment

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 fixes a workflow failure by removing duplicate git tag creation from the changeset.js script. The release workflow was failing because the changesets job attempted to create a git tag that the release job had already created, resulting in a "fatal: tag already exists" error.

Changes:

  • Removed git tag creation and push operations from changeset.js
  • Updated documentation to clarify that tags must be pre-created by the caller
  • Updated error recovery instructions to reflect the removal of tag operations

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

The changesets job now runs after the agent job completes, ensuring
release highlights are generated before the CHANGELOG is updated.

Before: agent -> depends on changesets
After: changesets -> depends on agent

This allows the agent to generate release highlights first, then the
CHANGELOG can be updated with the full context.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 3, 2026

Copilot, update the needs for the changelog job so it runs after the agent job and depends on the agent job.

Updated in cc494d8. The changesets job now depends on the agent job and runs after it completes.

Copilot AI changed the title Remove duplicate tag creation from changeset.js Fix changesets workflow - Remove duplicate tag creation and update job dependencies Feb 3, 2026
Copilot AI requested a review from pelikhan February 3, 2026 22:32
@pelikhan pelikhan merged commit 17c31ff into main Feb 3, 2026
119 checks passed
@pelikhan pelikhan deleted the copilot/fix-github-actions-workflow-a34bcbbe-64ca-46cd-b3a2-f727bb8800c5 branch February 3, 2026 23:04
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