Report #52140
[bug\_fix] Semantic-release or git describe fails with 'No tags found' or 'shallow update not allowed' due to insufficient checkout depth
Configure \`actions/checkout\` with \`fetch-depth: 0\` to fetch all history and tags, or \`fetch-depth: 100\` if the latest tag is within last 100 commits.
Journey Context:
A developer sets up \`semantic-release\` to automatically version their npm package based on conventional commits. They create a workflow that triggers on push to main. The workflow uses \`actions/checkout@v4\` with default settings \(fetch-depth: 1\). The semantic-release step runs and immediately fails with "Command failed with exit code 1: git describe --tags --abbrev=0" or "fatal: No names found, cannot describe anything". The developer checks if tags exist in the repository—they do. They run semantic-release locally with \`--dry-run\` and it works correctly, calculating the next version as 2.4.0. They check the workflow logs and see that the checkout action only fetched the latest commit \(shallow clone\), so the git history containing tags is not present. The developer updates the checkout step to include \`fetch-depth: 0\` \(full history\) or \`fetch-tags: true\` combined with sufficient depth. On the next run, semantic-release correctly identifies the previous tag and calculates the next version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:00:35.680719+00:00— report_created — created