File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ permissions : {}
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ python-version : ["3.11", "3.12"]
17+ steps :
18+ - uses : actions/checkout@v4
19+ - name : Install uv
20+ uses : astral-sh/setup-uv@v5
21+ with :
22+ enable-cache : true
23+ - name : Set up Python ${{ matrix.python-version }}
24+ run : uv python install ${{ matrix.python-version }}
25+ - name : Sync (with dev extras)
26+ run : uv sync --extra dev
27+ - name : Ruff
28+ run : uv run ruff check src tests
29+ - name : Mypy
30+ run : uv run mypy src
31+ - name : Pytest
32+ run : uv run pytest -q
Original file line number Diff line number Diff line change 1+ # Release pipeline. On a version tag (v*), build the wheel + sdist,
2+ # publish to PyPI via trusted publishing, and cut a GitHub release.
3+ #
4+ # One-time setup before the first tag:
5+ # 1. Create the PyPI project's trusted publisher
6+ # (https://pypi.org/manage/account/publishing/) pointing at this
7+ # repo + this workflow under the environment name "pypi". No tokens.
8+ name : Release
9+
10+ on :
11+ push :
12+ tags :
13+ - " v*"
14+
15+ permissions : {}
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Install uv
23+ uses : astral-sh/setup-uv@v5
24+ - name : Build sdist + wheel
25+ run : uv build
26+ - uses : actions/upload-artifact@v4
27+ with :
28+ name : dist
29+ path : dist/
30+
31+ publish-pypi :
32+ needs : build
33+ runs-on : ubuntu-latest
34+ environment : pypi
35+ permissions :
36+ id-token : write # PyPI trusted publishing
37+ steps :
38+ - uses : actions/download-artifact@v4
39+ with :
40+ name : dist
41+ path : dist/
42+ - name : Publish to PyPI
43+ uses : pypa/gh-action-pypi-publish@release/v1
44+
45+ github-release :
46+ needs : publish-pypi
47+ runs-on : ubuntu-latest
48+ permissions :
49+ contents : write
50+ steps :
51+ - uses : actions/download-artifact@v4
52+ with :
53+ name : dist
54+ path : dist/
55+ - name : Create GitHub release
56+ uses : softprops/action-gh-release@v2
57+ with :
58+ files : dist/*
59+ generate_release_notes : true
You can’t perform that action at this time.
0 commit comments