Skip to content

Commit 448662d

Browse files
authored
Merge pull request #13 from richardkoehler/feature/cicd-github-actions
Add CI/CD with GitHub actions
2 parents 850eff9 + d10370b commit 448662d

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI - Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
20+
- name: Set up uv with Python
21+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
22+
with:
23+
python-version: "3.14"
24+
enable-cache: true
25+
26+
- name: Sync dependencies (locked, dev)
27+
run: |
28+
uv sync --locked --dev
29+
30+
- name: Run ruff (as in pre-commit)
31+
run: |
32+
uv run ruff check --exclude tests .
33+
34+
# Tests are temporarily disabled in CI until they are ready.
35+
# To re-enable, uncomment the step below once tests are stable.
36+
# - name: Run pytest
37+
# run: |
38+
# uv run pytest
39+

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CD - Create GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
name: Build package and publish GitHub Release
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v6
19+
20+
- name: Set up uv with Python
21+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
22+
with:
23+
python-version: "3.14"
24+
enable-cache: true
25+
26+
- name: Build distribution
27+
run: |
28+
uv build
29+
30+
- name: Create GitHub Release and upload artifacts
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
files: dist/*
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)