Skip to content

Commit bacf284

Browse files
committed
Use built wheel for version check in CI
Build distributions earlier in the GitHub Actions workflow and install the generated wheel (pip install dist/*.whl) for the version check instead of running pip install .; remove the duplicate build step. This ensures the tag vs package version verification uses the exact built artifact that will be published.
1 parent 79982b3 commit bacf284

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ jobs:
3131
pip install --upgrade pip
3232
pip install build twine "packaging>=24.2"
3333
34-
- name: Install package (for version check)
35-
run: pip install .
34+
- name: Build distributions
35+
run: |
36+
python -m build
37+
ls -l dist/
38+
39+
- name: Install wheel (for version check)
40+
run: pip install dist/*.whl
3641

3742
- name: Verify tag matches package version
3843
run: |
@@ -46,11 +51,6 @@ jobs:
4651
echo "Package version: $PKG_VERSION"
4752
test "$TAG_VERSION" = "$PKG_VERSION"
4853
49-
- name: Build distributions
50-
run: |
51-
python -m build
52-
ls -l dist/
53-
5454
- name: Publish to PyPI
5555
env:
5656
TWINE_USERNAME: __token__

0 commit comments

Comments
 (0)