fix(ci): avoid shallow tag pack checkout
Some checks failed
Package component / package (push) Failing after 2s

This commit is contained in:
李启源
2026-08-13 21:56:58 +08:00
parent 81f36bde71
commit d349220395
2 changed files with 4 additions and 2 deletions

View File

@@ -19,7 +19,9 @@ jobs:
tag_name="${{ gitea.ref_name }}"
git init .
git remote add origin "$repository_url"
git fetch --depth 1 origin "refs/tags/$tag_name:refs/tags/$tag_name"
# Gitea can return an invalid shallow pack for tag-only fetches.
# Fetch the tag without depth limiting and force protocol v0 for compatibility.
git -c protocol.version=0 fetch --no-tags origin "refs/tags/$tag_name:refs/tags/$tag_name"
git checkout --detach "$tag_name^{commit}"
- name: Set up pnpm