Skip to content

Commit 9ee2c75

Browse files
graycreateclaude
andauthored
fix: delete local tag before creating for force release (#76)
When using "Force release even if version unchanged", the workflow deletes the remote tag but not the local tag. This causes the `git tag -a` command to fail with "tag already exists". Added `git tag -d` before creating the tag to handle force releases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 5b71461 commit 9ee2c75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ jobs:
7575
VERSION="${{ steps.check.outputs.version }}"
7676
BUILD="${{ steps.check.outputs.build }}"
7777
78+
# Delete local tag if it exists (for force release)
79+
git tag -d "$TAG_NAME" 2>/dev/null || true
80+
7881
# Create annotated tag
7982
git tag -a "$TAG_NAME" -m "Release version $VERSION (build $BUILD)"
8083

0 commit comments

Comments
 (0)