Skip to content

Commit b22b828

Browse files
feat: Add versioning release system
1 parent ccecaa0 commit b22b828

5 files changed

Lines changed: 277 additions & 67 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release (miner)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'miner-v*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
uses: reef-technologies/release-toolkit/.github/workflows/release-notify.yml@v0.2.0
14+
with:
15+
package_dir: miner
16+
tag_prefix: miner-v
17+
python_version: '3.11'
18+
secrets:
19+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
20+
permissions:
21+
contents: write
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Release (validator)
2+
3+
on:
4+
push:
5+
tags:
6+
- 'validator-v*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release:
13+
uses: reef-technologies/release-toolkit/.github/workflows/release-notify.yml@v0.2.0
14+
with:
15+
package_dir: validator
16+
tag_prefix: validator-v
17+
python_version: '3.11'
18+
secrets:
19+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
20+
permissions:
21+
contents: write

miner/pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,23 @@ only-include = ["miner.py"]
2626
[tool.uv]
2727
exclude-newer = "1 week"
2828

29+
[tool.commitizen]
30+
name = "impacts_cz"
31+
version_provider = "pep621"
32+
tag_format = "miner-v$version"
33+
annotated_tag = true
34+
changelog_file = "CHANGELOG.md"
35+
update_changelog_on_bump = true
36+
changelog_merge_prerelease = true
37+
bump_message = "bump: miner $current_version -> $new_version"
38+
impacts = ["miner"]
39+
major_version_zero = true
2940
[dependency-groups]
3041
dev = [
3142
"basedpyright>=1.36.1",
3243
"ruff",
3344
"pytest",
45+
"release-toolkit>=0.2.1,<1",
3446
]
3547

3648
[tool.ruff]

validator/pyproject.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,28 @@ validator = "validator.main:main"
1818
requires = ["hatchling"]
1919
build-backend = "hatchling.build"
2020

21-
[tool.uv]
22-
exclude-newer = "1 week"
23-
2421
[tool.uv.sources]
2522
bittensor-nexus-library = { git = "https://github.com/bittensor-church/bittensor-nexus-library.git", branch = "kb" }
2623

24+
25+
[tool.commitizen]
26+
name = "impacts_cz"
27+
version_provider = "pep621"
28+
tag_format = "validator-v$version"
29+
annotated_tag = true
30+
changelog_file = "CHANGELOG.md"
31+
update_changelog_on_bump = true
32+
changelog_merge_prerelease = true
33+
bump_message = "bump: validator $current_version -> $new_version"
34+
impacts = ["validator"]
35+
major_version_zero = true
2736
[dependency-groups]
2837
dev = [
2938
"basedpyright>=1.36.1",
3039
"ruff",
3140
"pytest",
3241
"polyfactory",
42+
"release-toolkit>=0.2.1,<1",
3343
]
3444

3545
[tool.ruff]

0 commit comments

Comments
 (0)