Skip to content

Commit 9cb4d78

Browse files
committed
ci: use bump-my-version in regenerate workflow
Use a conventional versioning tool to bump patch versions during client regeneration, avoiding custom version parsing logic while keeping the generated package version in sync.
1 parent 147df60 commit 9cb4d78

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/regenerate.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ jobs:
3636
- name: Clean existing source
3737
run: rm -rf src/
3838

39-
- name: Read package version from pyproject.toml
39+
- name: Bump package patch version in pyproject.toml
4040
id: pkg
4141
run: |
42-
version=$(python3 -c "import tomllib,pathlib; print(tomllib.loads(pathlib.Path('pyproject.toml').read_text())['project']['version'])")
42+
python3 -m pip install --quiet bump-my-version
43+
bump-my-version bump patch --no-commit --no-tag --allow-dirty
44+
version=$(bump-my-version show current_version)
4345
echo "version=$version" >> "$GITHUB_OUTPUT"
4446
4547
- name: Generate client

0 commit comments

Comments
 (0)