Skip to content

Commit 7e4bdb8

Browse files
committed
ci: fix release workflow
1 parent 8d9e7e4 commit 7e4bdb8

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
- name: Bump version for developmental release
3636
if: "! steps.check-version.outputs.tag"
3737
run: |
38-
uv run bump-my-version dev
38+
next=$(uv run bump-my-version show new_version --increment patch)
39+
uv run bump-my-version bump --new-version "${next}.dev.$(date +%s)"
3940
4041
- name: Build package
4142
run: |

pyproject.toml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -184,27 +184,20 @@ venv = ".venv"
184184

185185
[tool.bumpversion]
186186
current_version = "1.8.7"
187-
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
188-
serialize = ["{major}.{minor}.{patch}"]
189-
search = "{current_version}"
190-
replace = "{new_version}"
191-
regex = false
192-
ignore_missing_version = false
193-
ignore_missing_files = false
194-
tag = false
195-
sign_tags = false
196-
tag_name = "v{new_version}"
197-
tag_message = "Bump version: {current_version} → {new_version}"
198-
allow_dirty = false
199-
commit = true
200-
message = "Bump version: {current_version} → {new_version}"
201-
moveable_tags = []
202-
commit_args = ""
203-
setup_hooks = []
204-
pre_commit_hooks = []
205-
post_commit_hooks = []
206-
187+
parse = """(?x)
188+
(?P<major>0|[1-9]\\d*)\\.
189+
(?P<minor>0|[1-9]\\d*)\\.
190+
(?P<patch>0|[1-9]\\d*)
191+
(?:\\.dev(?P<dev>0|[1-9]\\d*))?
192+
"""
193+
serialize = [
194+
"{major}.{minor}.{patch}.dev{dev}",
195+
"{major}.{minor}.{patch}"
196+
]
207197

198+
[tool.bumpversion.parts.dev]
199+
type = "int"
200+
optional = true
208201
[[tool.bumpversion.files]]
209202
filename = "soccerdata/__init__.py"
210203

0 commit comments

Comments
 (0)