Skip to content

Commit 9bcaf69

Browse files
committed
feat: add bump-my-version configuration and GitHub Actions workflow for automated PyPI publishing
1 parent 13db3b5 commit 9bcaf69

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
name: Publish to PyPI
11+
runs-on: ubuntu-latest
12+
environment: pypi
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv and setup Python
19+
uses: astral-sh/setup-uv@v3
20+
21+
- name: Build package
22+
run: uv build
23+
24+
- name: Publish to PyPI
25+
run: uv publish

pyproject.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,31 @@ build-backend = "setuptools.build_meta"
5252

5353
[tool.setuptools]
5454
py-modules = ["mcp_server_code_extractor"]
55+
56+
[tool.bumpversion]
57+
current_version = "0.1.1"
58+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
59+
serialize = ["{major}.{minor}.{patch}"]
60+
search = "{current_version}"
61+
replace = "{new_version}"
62+
regex = false
63+
ignore_missing_version = false
64+
tag = true
65+
sign_tags = false
66+
tag_name = "v{new_version}"
67+
tag_message = "Bump version: {current_version} → {new_version}"
68+
allow_dirty = false
69+
commit = true
70+
message = "Bump version: {current_version} → {new_version}"
71+
pre_commit_hooks = ["uv sync", "git add uv.lock"]
72+
commit_args = ""
73+
74+
[[tool.bumpversion.files]]
75+
filename = "pyproject.toml"
76+
search = 'version = "{current_version}"'
77+
replace = 'version = "{new_version}"'
78+
79+
[dependency-groups]
80+
dev = [
81+
"bump-my-version>=1.2.0",
82+
]

0 commit comments

Comments
 (0)