Skip to content

Commit e9a6361

Browse files
hsbtclaude
andauthored
fix: use --force flag with git fetch --tags to avoid tag clobber error (#27)
When a workflow is triggered by a tag push, the tag already exists locally after checkout. `git fetch --tags` then fails with "would clobber existing tag" for that tag. Adding --force allows the fetch to overwrite the existing local tag. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2cceab0 commit e9a6361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ runs:
4040
git config --local credential.helper 'cache --timeout=300'
4141
shell: bash
4242
- name: Fetch tags
43-
run: git fetch --tags
43+
run: git fetch --tags --force
4444
shell: bash
4545
- name: Configure trusted publishing credentials
4646
if: ${{ inputs.setup-trusted-publisher == 'true' }}

0 commit comments

Comments
 (0)