File tree Expand file tree Collapse file tree 7 files changed +143
-87
lines changed Expand file tree Collapse file tree 7 files changed +143
-87
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Main branch checks
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ checks :
9+ uses : ./.github/workflows/shared.yml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Publishing
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*.*.*"
7+
8+ jobs :
9+ release-build :
10+ name : Build distribution
11+ runs-on : ubuntu-latest
12+ needs : [checks]
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Install uv
17+ uses : astral-sh/setup-uv@v3
18+
19+ - name : " Set up Python"
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version-file : " .python-version"
23+
24+ - name : Install the project
25+ run : uv sync --frozen --all-extras --dev
26+
27+ - name : Build
28+ run : uv build
29+
30+ - name : Upload artifacts
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : release-dists
34+ path : dist/
35+
36+ checks :
37+ uses : ./.github/workflows/shared.yml
38+
39+ pypi-publish :
40+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
41+ name : Upload release to PyPI
42+ runs-on : ubuntu-latest
43+ environment : release
44+ needs :
45+ - release-build
46+ permissions :
47+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
48+
49+ steps :
50+ - name : Retrieve release distributions
51+ uses : actions/download-artifact@v4
52+ with :
53+ name : release-dists
54+ path : dist/
55+
56+ - name : Publish package distributions to PyPI
57+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1+ name : Pull request checks
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ checks :
8+ uses : ./.github/workflows/shared.yml
Original file line number Diff line number Diff line change 1+ name : Shared Checks
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ format :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+
12+ - name : Install uv
13+ uses : astral-sh/setup-uv@v3
14+ with :
15+ enable-cache : true
16+
17+ - name : " Set up Python"
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version-file : " .python-version"
21+
22+ - name : Install the project
23+ run : uv sync --frozen --all-extras --dev
24+
25+ - name : Run ruff format check
26+ run : uv run --frozen ruff check .
27+
28+ typecheck :
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - name : Install uv
34+ uses : astral-sh/setup-uv@v3
35+ with :
36+ enable-cache : true
37+
38+ - name : " Set up Python"
39+ uses : actions/setup-python@v5
40+ with :
41+ python-version-file : " .python-version"
42+
43+ - name : Install the project
44+ run : uv sync --frozen --all-extras --dev
45+
46+ - name : Run pyright
47+ run : uv run --frozen pyright
48+
49+ build :
50+ runs-on : ubuntu-latest
51+
52+ steps :
53+ - uses : actions/checkout@v4
54+
55+ - name : Install uv
56+ uses : astral-sh/setup-uv@v3
57+ with :
58+ enable-cache : true
59+
60+ - name : " Set up Python"
61+ uses : actions/setup-python@v5
62+ with :
63+ python-version-file : " .python-version"
64+
65+ - name : Install the project
66+ run : uv sync --frozen --all-extras --dev
67+
68+ - name : Run pytest
69+ run : uv run --frozen pytest
You can’t perform that action at this time.
0 commit comments