-
-
Couldn't load subscription status.
- Fork 227
Description
actions/checkout@v2 no longer fetches tags by default, rather only a single commit, $GITHUB_REF (actions/checkout#100).
Hence, fetch-depth: 0 is needed for the proper version to be detected (unless GH actions runs was triggered on a tag@HEAD):
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0This however slows down checkout significantly on big repos (actions/checkout#258).
Only fetching tags (manually) does not solve the problem:
steps:
- uses: actions/checkout@v2
- name: Fetch tags
# fetch all tags for changelog and pip install
run: git fetch origin --depth=1 +refs/tags/*:refs/tags/*What would be the minimum amount of info to fetch for setuptools_scm to pick up the right tag? Any explanation why it doesn't detect version after running git fetch origin --depth=1 +refs/tags/*:refs/tags/*? Potentially related comment: https://github.com/actions/checkout#217#issuecomment-614067896