Skip to content

Commit 6fed32c

Browse files
committed
fix: update pyproject.toml version before building for TestPyPI
The workflow was setting VERSION env var but the build process reads version from pyproject.toml. This caused dev versions (1.0.0.devXXX) to be published as stable versions (1.0.0). Now we update pyproject.toml with the calculated dev version before building the package.
1 parent b3396ed commit 6fed32c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/dev-pypi.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ jobs:
8585
with:
8686
cache-key: deps-${{ needs.get-config.outputs.default-python-version }}-${{ hashFiles('.project.yml', 'pyproject.toml', 'requirements*.txt') }}
8787
fail-on-cache-miss: false
88+
- name: Update version in pyproject.toml
89+
run: |
90+
# Update version in pyproject.toml for dev builds
91+
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
92+
echo "Updated pyproject.toml version to: $VERSION"
93+
grep "^version = " pyproject.toml
94+
8895
- name: Build package
8996
run: |
9097
make build

0 commit comments

Comments
 (0)