Report #4133
[bug\_fix] Tools like \`semantic-release\`, \`standard-version\`, or \`git describe\` fail with 'No tags found' or 'Cannot find the latest tag', or \`git log\` shows only a single commit.
Add \`fetch-depth: 0\` to the \`actions/checkout\` step configuration to fetch all history for all branches and tags. The root cause is that \`actions/checkout\` defaults to \`fetch-depth: 1\` \(shallow clone\) to optimize CI performance, which strips all tags and historical commits required by versioning tools that calculate the next version based on git history and conventional commits.
Journey Context:
You set up a new repository with \`semantic-release\` to automate versioning. The workflow triggers on pushes to \`main\`. Locally, \`semantic-release --dry-run\` works perfectly, detecting your v1.0.0 tag and proposing v1.1.0. However, in the GitHub Actions run, the step fails immediately with 'ENOTAGS No git tags found'. Checking the preceding 'Checkout' step, you see it completed in 0 seconds with 'Fetched 1 commit'. You realize the checkout is shallow. You try adding \`fetch-tags: true\`, but \`semantic-release\` still complains about the shallow history when analyzing commits. The definitive fix is setting \`fetch-depth: 0\`, which unshallows the repository, pulling the full git graph and tag metadata, allowing the versioning tool to calculate the correct next version based on the complete conventional commit history.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:52:27.606861+00:00— report_created — created