Skip to content

Fix setuptools-scm version resolution in CI workflows#204

Merged
DasBasti merged 1 commit into
mainfrom
copilot/fix-main-branch-tag
Jun 11, 2026
Merged

Fix setuptools-scm version resolution in CI workflows#204
DasBasti merged 1 commit into
mainfrom
copilot/fix-main-branch-tag

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

setuptools-scm derives the package version from git tags, but actions/checkout defaults to depth=1 which strips tags. This caused the publish workflow to build with a stale version (0.9.2 instead of 0.10.0).

  • Add fetch-depth: 0 to checkout in python-publish.yml and python-package.yml so the full tag history is available to setuptools-scm

After merge, re-create the GitHub Release from the v0.10.0 tag to trigger a correct publish.

Copilot AI changed the title fix: ensure setuptools-scm resolves correct version from git tags Fix setuptools-scm version resolution in CI workflows Jun 11, 2026
Copilot AI requested a review from DasBasti June 11, 2026 19:39
@DasBasti DasBasti marked this pull request as ready for review June 11, 2026 20:04
Copilot AI review requested due to automatic review settings June 11, 2026 20:04
@DasBasti DasBasti merged commit a49f0a6 into main Jun 11, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GitHub Actions CI workflows to ensure setuptools-scm can correctly derive the project version from git tags by making actions/checkout fetch the full repository history (including tags). This addresses incorrect/stale versioning during builds/publishing when the default shallow checkout (depth=1) omits tag history.

Changes:

  • Configure actions/checkout with fetch-depth: 0 in the publish workflow so release builds have full tag history available.
  • Configure actions/checkout with fetch-depth: 0 in the package/test workflow to keep version resolution consistent during CI installs/build steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/python-publish.yml Fetch full git history/tags during release publish to allow setuptools-scm to resolve the correct version.
.github/workflows/python-package.yml Fetch full git history/tags in CI runs to avoid shallow-clone version resolution issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants