6
6
7
7
env :
8
8
PYTHON_VERSION : " 3.11"
9
- POETRY_VERSION : " 2.0.1 "
9
+ UV_VERSION : " 0.7.13 "
10
10
11
11
jobs :
12
12
build :
13
13
runs-on : ubuntu-latest
14
14
15
15
steps :
16
- - uses : actions/checkout@v4
16
+ - name : Check out repository
17
+ uses : actions/checkout@v4
17
18
18
- - name : Set up Python
19
- uses : actions/setup-python@v4
19
+ - name : Install Python
20
+ uses : actions/setup-python@v5
20
21
with :
21
22
python-version : ${{ env.PYTHON_VERSION }}
22
23
23
- - name : Install Poetry
24
- uses : snok/install-poetry@v1
24
+ - name : Install uv
25
+ uses : astral-sh/setup-uv@v6
25
26
with :
26
- version : ${{ env.POETRY_VERSION }}
27
+ version : ${{ env.UV_VERSION }}
28
+ enable-cache : true
29
+ python-version : ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
30
+ cache-dependency-glob : |
31
+ pyproject.toml
32
+ uv.lock
33
+
34
+ - name : Install dependencies
35
+ run : |
36
+ uv sync --frozen
27
37
28
38
- name : Build package
29
- run : poetry build
39
+ run : uv build
30
40
31
41
- name : Upload build
32
42
uses : actions/upload-artifact@v4
@@ -39,24 +49,35 @@ jobs:
39
49
runs-on : ubuntu-latest
40
50
41
51
steps :
42
- - uses : actions/checkout@v4
52
+ - name : Check out repository
53
+ uses : actions/checkout@v4
43
54
44
- - name : Set up Python
45
- uses : actions/setup-python@v4
55
+ - name : Install Python
56
+ uses : actions/setup-python@v5
46
57
with :
47
58
python-version : ${{ env.PYTHON_VERSION }}
48
59
49
- - name : Install Poetry
50
- uses : snok/install-poetry@v1
60
+ - name : Install uv
61
+ uses : astral-sh/setup-uv@v6
51
62
with :
52
- version : ${{ env.POETRY_VERSION }}
63
+ version : ${{ env.UV_VERSION }}
64
+ enable-cache : true
65
+ python-version : ${{ env.PYTHON_VERSION }} # sets UV_PYTHON
66
+ cache-dependency-glob : |
67
+ pyproject.toml
68
+ uv.lock
69
+
70
+ - name : Install dependencies
71
+ run : |
72
+ uv sync --frozen
53
73
54
- - uses : actions/download-artifact@v4
74
+ - name : Download build artifacts
75
+ uses : actions/download-artifact@v4
55
76
with :
56
77
name : dist
57
78
path : dist/
58
79
59
80
- name : Publish to PyPI
60
81
env :
61
- POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI }}
62
- run : poetry publish
82
+ UV_PUBLISH_TOKEN : ${{ secrets.PYPI }}
83
+ run : uv publish
0 commit comments