Skip to content

Commit 2ea0c53

Browse files
committed
core: fix automatic versioning
1 parent f9cfff6 commit 2ea0c53

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.bumpversion.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
[tool.bumpversion]
2-
current_version = "0.1.0"
2+
current_version = "0.0.0"
33
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
44
serialize = ["{major}.{minor}.{patch}"]
55
search = "{current_version}"
66
replace = "{new_version}"
77
regex = false
88
ignore_missing_version = false
99
ignore_missing_files = false
10-
tag = false
10+
tag = true
1111
sign_tags = false
1212
tag_name = "v{new_version}"
1313
tag_message = "Bump version: {current_version} → {new_version}"
1414
allow_dirty = false
15-
commit = false
16-
message = "Bump version: {current_version} → {new_version}"
17-
moveable_tags = []
15+
commit = true
16+
message = "🥳 Bump version 📣 – {current_version} → {new_version}"
1817
commit_args = ""
1918
setup_hooks = []
2019
pre_commit_hooks = []
2120
post_commit_hooks = []
21+
moveable_tags = []
22+
23+
[[tool.bumpversion.files]]
24+
filename = "pyproject.toml"
25+
search = "version = \"{current_version}\""
26+
replace = "version = \"{new_version}\""

.github/workflows/automatic_versioning.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ jobs:
1919
steps:
2020
- name: Checkout the code
2121
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
2224

2325
- name: Bump version
2426
id: bump
2527
uses: callowayproject/bump-my-version@master
2628
env:
2729
BUMPVERSION_TAG: "true"
2830
with:
29-
args: ${{ inputs.bump-type }}
31+
args: ${{ inputs.bump-type }} --config-file .bumpversion.toml
32+
github-token: ${{ secrets.GH_TOKEN }}
3033

3134
- name: Check
3235
if: steps.bump.outputs.bumped == 'true'

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ license = {text = "MIT"}
1313
readme = "README.md"
1414
requires-python = ">=3.10"
1515
keywords = []
16-
dynamic = ["version"]
16+
version = "0.0.0"
1717
classifiers = [
1818
"Development Status :: 4 - Beta",
1919
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)