Skip to content

Commit af31261

Browse files
committed
Fixing versioning for static version
1 parent 81d4fa1 commit af31261

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,19 @@ jobs:
3737
echo "version=$VERSION" >> $GITHUB_OUTPUT
3838
echo "Building version: $VERSION"
3939
40+
- name: Update version in pyproject.toml
41+
run: |
42+
VERSION="${{ steps.version.outputs.version }}"
43+
# Update version in pyproject.toml
44+
sed -i "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml
45+
# Also update setup.py if it has a hardcoded version
46+
sed -i "s/version = \".*\"/version = \"$VERSION\"/" setup.py 2>/dev/null || true
47+
echo "Updated version to $VERSION"
48+
# Verify the update
49+
grep "version = \"$VERSION\"" pyproject.toml
50+
4051
- name: Build package
4152
run: python -m build
42-
env:
43-
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.version.outputs.version }}
4453

4554
- name: Verify package
4655
run: |

0 commit comments

Comments
 (0)