Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit 159bc22

Browse files
committed
ci: set up bumpversion release workflow
1 parent d7fb022 commit 159bc22

File tree

4 files changed

+51
-21
lines changed

4 files changed

+51
-21
lines changed

.github/workflows/bumpversion.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Bump version
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
bump_version:
10+
runs-on: ubuntu-latest
11+
name: "Bump version and create changelog with commitizen"
12+
steps:
13+
- name: Check out
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Create bump and changelog
18+
uses: commitizen-tools/commitizen-action@master
19+
with:
20+
github_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
21+
changelog_increment_filename: body.md
22+
- name: Release
23+
uses: softprops/action-gh-release@v1
24+
with:
25+
body_path: "body.md"
26+
tag_name: "${{ env.REVISION }}"
27+
env:
28+
GITHUB_TOKEN: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,15 @@ jobs:
1717
- uses: actions/checkout@v4
1818
- name: Install dependencies
1919
run: uv sync --locked
20+
2021
- name: Lint (ruff)
2122
run: uv run ruff check . --fix
23+
2224
- name: Format (ruff format)
2325
run: uv run ruff format .
26+
2427
- name: Type check (pyright)
2528
run: uv run pyright
29+
2630
- name: Run unit tests
2731
run: uv run pytest

README.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,22 @@ This template integrates **CI/CD, Docker, pre-commit hooks, and Pyright type che
1414
## 📦 Getting Started
1515

1616
```bash
17+
uv venv
18+
1719
# Install dependencies
1820
uv sync
1921

2022
# Run app
2123
uv run main.py
2224
```
2325

24-
## 🧹 Pre-commit Hooks
25-
26-
Configured with [pre-commit](https://pre-commit.com/):
27-
28-
```bash
29-
pre-commit install --install-hooks --hook-type pre-commit --hook-type commit-msg --hook-type pre-push
30-
pre-commit run --all-files # Run all hooks on all files (only needed once after installation)
31-
```
32-
33-
## 🐳 Docker
34-
35-
```bash
36-
docker build -t uv-python-workflow .
37-
docker run --rm uv-python-workflow
38-
```
39-
4026
## 🔄 CI/CD
4127

42-
GitHub Actions workflow (`.github/workflows/ci.yml`) runs:
43-
4428
- Dependency install with `uv`
4529
- Linting & formatting with `ruff`
4630
- Type checking with `pyright`
4731
- Tests with `pytest`
32+
- Bump version with `commitizen`
4833

4934
## 🧭 Commitizen (Conventional Commits)
5035

@@ -57,7 +42,20 @@ git add .
5742
5843
# Interactive commit
5944
cz commit or cz c
45+
```
46+
47+
## 🧹 Pre-commit Hooks
48+
49+
Configured with [pre-commit](https://pre-commit.com/):
50+
51+
```bash
52+
pre-commit install --install-hooks --hook-type pre-commit --hook-type commit-msg --hook-type pre-push
53+
pre-commit run --all-files # Run all hooks on all files (only needed once after installation)
54+
```
55+
56+
## 🐳 Docker
6057

61-
# Semantic version bump + tag (optional)
62-
cz bump --yes
58+
```bash
59+
docker build -t uv-python-workflow .
60+
docker run --rm uv-python-workflow
6361
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ major_version_zero = true
2222
name = "cz_conventional_commits"
2323
tag_format = "v$version"
2424
update_changelog_on_bump = true
25-
version_provider = "pep621"
25+
version_provider = "uv"
2626
version_scheme = "pep440"
2727

2828
[tool.ruff] # https://docs.astral.sh/ruff/settings/#top-level

0 commit comments

Comments
 (0)