Report #37053
[bug\_fix] Tools like semantic-release, lerna, or standard-version fail with 'shallow update not allowed' or incorrect version calculation due to limited git history
Configure \`actions/checkout\` with \`fetch-depth: 0\` to fetch all history for all branches and tags, and add \`fetch-tags: true\` if tags are needed for versioning.
Journey Context:
You set up \`semantic-release\` in your CI. It works locally but in GitHub Actions it calculates the next version as 1.0.0 instead of the expected 1.2.0, or it fails to push with 'shallow update not allowed'. You inspect the checkout step and see 'Fetching the repository' with \`fetch-depth: 1\` \(the default\). You realize the tool needs the full git history to analyze commits since the last release tag. You add \`fetch-depth: 0\` to the checkout action, which fetches all history and tags, allowing the tool to correctly determine the version bump and push without shallow clone errors.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:40:21.100429+00:00— report_created — created