fetch-tags: true doesn't actually fetch any tags
After https://github.com/actions/checkout/pull/579 was merged and released with v3.6.0, the fetch-tags option was introduced and it's kind of a breaking change for projects that depend on reading tags from the git history. It sets --no-tags in the git fetch command run by this action. I think this new option should have defaulted to true or introduced in v4 instead where it could possibly have had the default false.
Nevertheless, using fetch-tags: true without overriding the default fetch-depth: 1 actually doesn't fetch any tags unless the workflow was triggered by a tag push. So I think it's misleading and should be changed to fetch all tags if fetch-tags is set to true. The change to the git fetch command run by this action would be to append '+refs/tags/*:refs/tags/*' (tagsRefSpec) to the end even though fetch-depth is > 0.
Related issue: https://github.com/actions/checkout/issues/1467
A possible workaround would be to run another git fetch after using this checkout action like in https://github.com/actions/checkout/pull/579#issuecomment-1615799806, but that feels hacky.
Seems the author of the https://github.com/actions/checkout/pull/579 PR also discussed supporting my use-case here: https://github.com/actions/checkout/pull/579#issuecomment-1616149745 I'm sure that this added functionality would be very appreciated. Thanks for your consideration!
Source: actions/checkout