Skip to content

Commit 87bccea

Browse files
committed
feat: release action (#52)
* feat: github action to release pypi
1 parent 7ff2c62 commit 87bccea

File tree

3 files changed

+740
-683
lines changed

3 files changed

+740
-683
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
jobs:
13+
build-and-publish:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
24+
- name: Set up Python
25+
run: uv python install
26+
27+
- name: Install dependencies
28+
run: uv sync --group dev
29+
30+
- name: Build package
31+
run: uv build
32+
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
36+
- name: Create GitHub Release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
generate_release_notes: true

pyproject.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-openstackmcp-server"
3-
version = "0.1.0"
3+
dynamic = ["version"]
44
description = "A MCP server providing OpenStack services for MCP clients"
55
readme = "README.md"
66
requires-python = ">=3.10"
@@ -14,22 +14,23 @@ dependencies = [
1414
dev = [
1515
"ruff>=0.12.5",
1616
"pre-commit>=4.2.0",
17+
"setuptools-scm>=9.2.0",
1718
]
1819
test = [
1920
"pytest>=8.4.1",
2021
]
2122

2223

2324
[build-system]
24-
requires = [
25-
"hatchling",
26-
]
27-
build-backend = "hatchling.build"
25+
requires = ["setuptools>=61.0", "setuptools-scm"]
26+
build-backend = "setuptools.build_meta"
27+
28+
[tool.setuptools_scm]
29+
write_to = "src/openstack_mcp_server/_version.py"
30+
31+
[tool.setuptools.packages.find]
32+
where = ["src"]
2833

29-
[tool.hatch.build.targets.wheel]
30-
packages = [
31-
"src/openstack_mcp_server",
32-
]
3334

3435
[tool.pytest.ini_options]
3536
testpaths = [
@@ -55,6 +56,7 @@ python_functions = [
5556
line-length = 79
5657
exclude = [
5758
"docs",
59+
"_version.py",
5860
]
5961

6062
[tool.ruff.format]

0 commit comments

Comments
 (0)