Skip to content

Tag the release before creating draft#41

Merged
AButler merged 6 commits intomainfrom
tag-first
Feb 3, 2026
Merged

Tag the release before creating draft#41
AButler merged 6 commits intomainfrom
tag-first

Conversation

@AButler
Copy link
Owner

@AButler AButler commented Feb 3, 2026

No description provided.

@AButler AButler requested a review from Copilot February 3, 2026 11:12
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 modifies the release workflow to create a Git tag before generating the GitHub release draft. This ensures the tag exists before the release is created, which is a common best practice in release automation workflows.

Changes:

  • Added a new workflow step that creates a Git tag using the GitHub API before the release creation step

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

Comment on lines 86 to 92
const tag = process.env.TAG;
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `refs/tags/${tag}`,
sha: context.sha
})
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The tag creation lacks error handling for the case where the tag already exists. If this workflow is re-run or the tag already exists, it will fail without a clear indication. Consider adding a try-catch block to handle this scenario gracefully, or check if the tag exists before attempting to create it.

Copilot uses AI. Check for mistakes.
Copy link
Owner Author

Choose a reason for hiding this comment

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

@copilot append a commit to this PR to address this feedback (#41 (comment)). If the tag already exists with the same SHA then it should not create the tag and success the step. If the tag already exists with a different SHA then it should fail the step.

Copy link
Contributor

Copilot AI commented Feb 3, 2026

@AButler I've opened a new pull request, #42, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 4 commits February 3, 2026 11:19
Co-authored-by: AButler <1628649+AButler@users.noreply.github.com>
Co-authored-by: AButler <1628649+AButler@users.noreply.github.com>
Co-authored-by: AButler <1628649+AButler@users.noreply.github.com>
Add idempotent tag creation with SHA validation to release workflow
@AButler AButler merged commit 484c43b into main Feb 3, 2026
2 checks passed
@AButler AButler deleted the tag-first branch February 3, 2026 11:36
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