Skip to content

Commit d179f5d

Browse files
authored
Update publish.yml
1 parent f5b0d08 commit d179f5d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
python -m pip install --upgrade pip
35-
pip install build twine toml
35+
# 🔑 FIX: Install 'tomli' instead of 'toml' for robust TOML parsing
36+
pip install build twine tomli
3637
3738
- name: Verify package version
3839
run: |
39-
PACKAGE_VERSION=$(python -c "import toml; print(toml.load(open('pyproject.toml'))['project']['version'])")
40+
# 🔑 FIX: Use 'tomli' (installed above) to read pyproject.toml in binary mode
41+
PACKAGE_VERSION=$(python -c "import tomli; print(tomli.load(open('pyproject.toml', 'rb'))['project']['version'])")
42+
4043
TAG_VERSION="${{ github.ref_name }}"
4144
4245
# Remove 'v' prefix if it exists from the tag name

0 commit comments

Comments
 (0)