Skip to content

fix(ci): add fetch-depth: 0 to fix tag checkout on release trigger#32

Merged
jimisola merged 1 commit into
mainfrom
fix/vscode-publish-fetch-depth
May 13, 2026
Merged

fix(ci): add fetch-depth: 0 to fix tag checkout on release trigger#32
jimisola merged 1 commit into
mainfrom
fix/vscode-publish-fetch-depth

Conversation

@jimisola
Copy link
Copy Markdown
Member

Summary

  • Adds fetch-depth: 0 to the actions/checkout step in typescript-publish-to-vscode.yml
  • Fixes the Cannot fetch both <sha> and refs/tags/<tag> to refs/tags/<tag> error that occurs when a release triggers the publish workflow with fetch-tags: true and the default shallow clone (fetch-depth: 1)

Root cause

With fetch-depth: 1 (shallow) + fetch-tags: true, git's fetch refspec includes both the commit SHA and the tag name pointing to the same local ref. Git rejects this as ambiguous. Using fetch-depth: 0 (full clone) avoids the conflict.

Test plan

With fetch-tags: true and the default fetch-depth: 1, git fails to
fetch a tag-triggered workflow because it cannot map both the commit
SHA and refs/tags/<tag> to the same local ref in a shallow clone.

Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
@jimisola jimisola merged commit cb8dbca into main May 13, 2026
22 checks passed
@jimisola jimisola deleted the fix/vscode-publish-fetch-depth branch May 13, 2026 19:49
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.

1 participant