Skip to content

Commit d851d24

Browse files
committed
Fix issue to versioning
1 parent 2a4562f commit d851d24

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,18 @@ jobs:
5252
git describe --exact-match HEAD || (echo "::error::HEAD is not exactly on tag ${{ github.ref_name }}"; exit 1)
5353
echo "Building version from tag: ${{ github.ref_name }}"
5454
55+
# Force version from tag; hatch-vcs/setuptools-scm can yield next_version.dev0 when
56+
# they don't detect exact tag (e.g. in isolated build env), so we pin the version.
57+
- name: Set version from tag for build
58+
id: set_version
59+
run: echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
60+
5561
- name: Clean previous builds
5662
run: git clean -xfd dist build *.egg-info || true
5763

5864
- name: Build package
65+
env:
66+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TABPFN_COMMON_UTILS: ${{ steps.set_version.outputs.version }}
5967
run: uv run python -m build
6068

6169
- name: Upload build artifacts

0 commit comments

Comments
 (0)