Skip to content

Commit c82f4b0

Browse files
committed
fix(ci): ensure proper version in PyPI releases
Fix release workflow to properly resolve version from git tags instead of defaulting to 0.0.0. The issue occurred because actions/checkout@v4 requires explicit tag fetching, unlike the older v2 used in upstream. Changes: - Add ref: ${{ github.ref }} to checkout the exact release tag - Add fetch-tags: true to explicitly fetch all tags for setuptools_scm This ensures setuptools_scm can properly determine the version from git tags (e.g., v1.12.2.4-beta3 → 1.12.2.4b3) instead of falling back to version 0.0.0. Related: Previous releases incorrectly published as version 0.0.0
1 parent a1dd29d commit c82f4b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ jobs:
3030
restore-keys: ${{ runner.os }}-${{ matrix.PYTHON_VERSION }}-pip-
3131
- uses: actions/checkout@v4
3232
with:
33+
ref: ${{ github.ref }}
3334
fetch-depth: 0
35+
fetch-tags: true
3436
- uses: actions/setup-python@v5
3537
with:
3638
python-version: ${{ matrix.PYTHON_VERSION }}

0 commit comments

Comments
 (0)