Report #9084
[bug\_fix] Tools like \`semantic-release\`, \`standard-version\`, \`git describe\`, or \`lint-staged\` \(on changed files\) fail with 'No commits found', 'Cannot find tag', or incorrect version calculation \(e.g., 0.0.0\).
Configure \`actions/checkout\` with \`fetch-depth: 0\` to fetch the full git history and all tags.
Journey Context:
Developer sets up \`semantic-release\` locally to automate versioning based on conventional commits. It works perfectly: analyzes git history, finds the last tag \(v1.2.0\), determines next version \(v1.3.0\) based on commits since then. They migrate to GitHub Actions. Workflow uses \`- uses: actions/checkout@v4\` then \`npx semantic-release\`. The job fails with 'There are no relevant commits, so no new version is released' or 'Cannot find any tags'. Developer runs \`git log\` locally \(sees 500 commits\) vs \`git log\` in CI \(sees 1 commit\). Realizes \`actions/checkout\` defaults to shallow clone \(\`fetch-depth: 1\`\) for performance. They add \`with: fetch-depth: 0\` to the checkout step. The next run fetches all history and tags; \`semantic-release\` correctly identifies v1.2.0 and releases v1.3.0.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:15:37.000292+00:00— report_created — created