Skip to content

Commit 4186868

Browse files
authored
Update release_pypi.yml
1 parent f4a97ce commit 4186868

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/release_pypi.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,20 @@ jobs:
8484
sed -i "s/__version__ = \".*\"/__version__ = \"${NEW_VERSION}\"/" llm_dialog_manager/__init__.py
8585
8686
# Update version in pyproject.toml
87-
python -c "import toml; data = toml.load('pyproject.toml'); data['tool']['poetry']['version'] = '${NEW_VERSION}'; with open('pyproject.toml', 'w') as f: toml.dump(data, f)"
87+
python -c "
88+
import toml
89+
90+
# Read the current content
91+
with open('pyproject.toml', 'r') as f:
92+
data = toml.load(f)
93+
94+
# Update the version in the project section
95+
data['project']['version'] = '${NEW_VERSION}'
96+
97+
# Write back to the file
98+
with open('pyproject.toml', 'w') as f:
99+
toml.dump(data, f)
100+
"
88101
89102
# Commit the version update
90103
git config --local user.email "github-actions[bot]@users.noreply.github.com"

0 commit comments

Comments
 (0)