Skip to content

Commit 5ebb0d7

Browse files
committed
Fixes workflows
1 parent 11a455e commit 5ebb0d7

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.github/workflows/bumpversion.yaml

+13-7
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ jobs:
3838

3939
- name: Install requirements
4040
run: |
41-
python -m pip install generate-changelog
42-
python -m pip install -e .
41+
python -m pip install generate-changelog bump-my-version
4342
4443
- name: Git check
4544
run: |
@@ -74,8 +73,15 @@ jobs:
7473
BUMPVERSION_NEW_VERSION: ${{ inputs.tags }}
7574
BUMPVERSION_VERBOSE: ${{ inputs.verbose }}
7675
run: |
77-
bump-my-version -v "$RELEASE_KIND"
78-
if [[ BUMPVERSION_DRY_RUN == "false" ]]; then
79-
git push
80-
git push --tags
81-
fi
76+
case "$RELEASE_KIND" in
77+
major|minor|patch)
78+
bump-my-version bump "$RELEASE_KIND"
79+
if [[ BUMPVERSION_DRY_RUN == "false" ]]; then
80+
git push
81+
git push --tags
82+
fi
83+
;;
84+
release-candidate)
85+
bump-my-version bump --no-commit "$RELEASE_KIND"
86+
;;
87+
esac

.github/workflows/ci.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ jobs:
8080
- name: Set dev version
8181
shell: bash
8282
run: |
83-
bumpversion dev bumpversion/__init__.py --no-commit --no-configured-files -v
83+
bump-my-version bump dev bumpversion/__init__.py --no-commit --no-configured-files -v
8484
8585
- name: Package
8686
shell: bash
8787
run: |
88-
python -m pip install --disable-pip-version-check --no-python-version-warning build
8988
python -m build
9089
9190
- name: Upload package to Test PyPI

bumpversion/scm.py

-2
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ def latest_tag_info(cls, tag_pattern: str) -> SCMInfo:
230230

231231
try:
232232
# get info about the latest tag in git
233-
# TODO: This only works if the tag name is prefixed with `v`.
234-
# Should allow for the configured format for the tag name.
235233
git_cmd = [
236234
"git",
237235
"describe",

0 commit comments

Comments
 (0)