Skip to content

Commit 90746b2

Browse files
committed
ci: add workflow to publish package to pypi
1 parent b8e357d commit 90746b2

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

.github/workflows/release.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Release"
2+
3+
on:
4+
push:
5+
tags:
6+
# Publish on any tag starting with a `v`, e.g., v0.1.0
7+
- v*
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi-publish
14+
permissions:
15+
id-token: write
16+
contents: read
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v5
20+
- name: Set up Python
21+
uses: actions/setup-python@v6
22+
with:
23+
python-version: "3.12"
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
26+
with:
27+
enable-cache: true
28+
- name: Build
29+
run: uv build
30+
- name: Publish
31+
run: uv publish

pyproject.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "debmagic"
3-
version = "0.1.0"
3+
version = "0.0.1-alpha.1"
44
description = "build debian packages"
55
license = { file = "LICENSE" }
66
readme = "README.md"
@@ -31,7 +31,15 @@ exclude_gitignore = true
3131
[tool.ruff]
3232
line-length = 120
3333
target-version = "py312"
34-
extend-exclude = [".idea", ".mypy_cache", ".venv*", "docs", "debian", "__pycache__", "*.egg_info"]
34+
extend-exclude = [
35+
".idea",
36+
".mypy_cache",
37+
".venv*",
38+
"docs",
39+
"debian",
40+
"__pycache__",
41+
"*.egg_info",
42+
]
3543

3644
[tool.ruff.lint]
3745
select = ["E", "W", "F", "I", "C", "N", "PL", "RUF", "I001"]

0 commit comments

Comments
 (0)