File tree Expand file tree Collapse file tree 2 files changed +22
-31
lines changed
Expand file tree Collapse file tree 2 files changed +22
-31
lines changed Original file line number Diff line number Diff line change 11name : Release python package
22
33on :
4- push :
5- tags :
6- - " * "
4+ release :
5+ types :
6+ - released
77
88jobs :
99 deploy :
1010 runs-on : ubuntu-latest
1111 steps :
12- - uses : actions/checkout@v4
12+ - uses : actions/checkout@v5
1313
14- - name : Set up Python
15- uses : actions /setup-python@v5
14+ - name : Install uv with python
15+ uses : astral-sh /setup-uv@v7
1616 with :
1717 python-version : " 3.12"
18-
19- - name : Install uv
20- uses : astral-sh/setup-uv@v1
21-
22- - name : Install project
23- run : uv pip install .
18+ enable-cache : true
2419
2520 - name : Set version from tag
26- run : uvx hatch version "${{ github.ref_name }}"
21+ run : uv version "${{ github.ref_name }}"
2722
2823 - name : Build artifacts
2924 run : uv build
3025
3126 - name : Publish package
32- env :
33- UV_PUBLISH_TOKEN : ${{ secrets.PYPI_TOKEN }}
3427 run : uv publish --token "${{ secrets.PYPI_TOKEN }}"
Original file line number Diff line number Diff line change 11name : Testing package
22
33on :
4- - push
5- - pull_request
4+ pull_request :
5+ paths-ignore :
6+ - ' *.md'
7+ push :
8+ paths-ignore :
9+ - ' *.md'
10+
611
712jobs :
813 lint :
@@ -12,25 +17,18 @@ jobs:
1217 cmd : ["black", "mypy", "ruff"]
1318 runs-on : ubuntu-latest
1419 steps :
15- - uses : actions/checkout@v4
16-
17- - name : Set up Python
18- uses : actions/setup-python@v5
19- with :
20- python-version : ${{ matrix.python-version }}
20+ - uses : actions/checkout@v5
2121
22- - name : Install uv
23- uses : astral-sh/setup-uv@v1
2422
25- - name : Cache uv dependencies
26- uses : actions/cache@v4
23+ - name : Install uv with python
24+ uses : astral-sh/setup-uv@v7
2725 with :
28- path : ~/.cache/uv
29- key : >-
30- ${{ runner.os }}-uv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
26+ python-version : " 3.12 "
27+ enable-cache : true
28+
3129
3230 - name : Install dependencies
33- run : uv pip install ".[dev]"
31+ run : uv sync --all-extras
3432
3533 - name : Run lint check
3634 run : uv run pre-commit run -a ${{ matrix.cmd }}
You can’t perform that action at this time.
0 commit comments