-
-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
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: 0
This 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
Metadata
Metadata
Assignees
Labels
No labels