ci(release): fetch full git history and tags for build.rs

build.rs uses vergen-git2 (Git2::all_git), which runs `git describe` and
reads commit metadata. The build and publish-crate jobs checked out a
shallow clone without tags, so vergen could not resolve the describe
string and libgit2 may fail on shallow repos. Add fetch-depth: 0 and
fetch-tags: true to both jobs that compile the crate.
This commit is contained in:
Christian Visintin
2026-06-08 19:16:58 +02:00
parent b1601fb17e
commit 3a5327f5b1

View File

@@ -115,6 +115,8 @@ jobs:
with:
ref: ${{ inputs.dry_run && github.sha || 'main' }}
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
targets: ${{ matrix.target }}
@@ -382,6 +384,8 @@ jobs:
with:
ref: main
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: Install dependencies (Linux)