-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch tags in CI for correct version #59
Conversation
The simple |
The solution was already partly contained in the publish workflow: we need to install the dynamic-versioning plugin in the CI runs as well, of course. One final note: we are currently only using lightweight tags. Git also offers annotated tags, which save the tag author and tag date. Should we ever apply multiple lightweight tags to the current commit, poetry-dynamic-versioning might struggle to identify the most recent tag. The solution for this is to use annotated tags. We can create them easily via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good - but please go through the workflow files once more and make the section-headings consistent (centered and see other comments inline).
I noticed before that our CI is not installing the correct version of our own library (it keeps being registered as v0.0.0). While reading up on poetry-dynamic-versioning limitations, I found a note about Dunamai's limitations, which powers poetry-dynamic-versioning. In order to register the version correctly in GitHub Actions, they recommend running the checkout action with
fetch-depth: 0
, which fetches all history for all branches and tags. However, v4 of the checkout action also offersfetch-tags
, which isfalse
by default.In theory, this sounds exactly like the thing we need, so this PR sets it to
true
in the relevant workflows.