99
1010jobs :
1111 build :
12- name : Build distribution 📦
12+ name : Build distribution
1313 runs-on : ubuntu-latest
1414
1515 steps :
1616 - uses : actions/checkout@v4
17-
18- - run : pipx install poetry
19-
20- - name : Set up Python
21- uses : actions/setup-python@v5
2217 with :
23- python-version : " 3.x"
24- cache : " poetry"
25-
26- - run : pipx inject poetry poetry-dynamic-versioning # https://github.com/python-poetry/poetry/issues/10028
27-
28- - run : poetry install
18+ fetch-depth : 0
2919
30- - name : Check for dirty state
31- run : git status --porcelain
20+ - uses : astral-sh/setup-uv@v6
3221
33- - name : Show pyproject.toml diff
34- run : git diff pyproject.toml
35-
36- - name : Undo any pyproject.toml changes
37- run : git restore pyproject.toml
38-
39- - run : poetry build
22+ - run : uv build
4023
4124 - name : Store the distribution packages
4225 uses : actions/upload-artifact@v4
4528 path : dist/
4629
4730 publish-to-pypi :
48- name : Publish Python 🐍 distribution 📦 to PyPI
31+ name : Publish to PyPI
4932 needs :
5033 - build
5134
@@ -54,28 +37,26 @@ jobs:
5437 name : pypi
5538 url : https://pypi.org/p/${{ env.name }}
5639 permissions :
57- id-token : write # IMPORTANT: mandatory for trusted publishing
40+ id-token : write
5841
5942 steps :
6043 - name : Download all the dists
6144 uses : actions/download-artifact@v4
6245 with :
6346 name : python-package-distributions
6447 path : dist/
65- - name : Publish distribution 📦 to PyPI
48+ - name : Publish distribution to PyPI
6649 uses : pypa/gh-action-pypi-publish@release/v1
6750
6851 github-release :
69- name : >-
70- Sign the Python 🐍 distribution 📦 with Sigstore
71- and upload them to GitHub Release
52+ name : Sign and upload to GitHub Release
7253 needs :
7354 - publish-to-pypi
7455 runs-on : ubuntu-latest
7556
7657 permissions :
77- contents : write # IMPORTANT: mandatory for making GitHub Releases
78- id-token : write # IMPORTANT: mandatory for sigstore
58+ contents : write
59+ id-token : write
7960
8061 steps :
8162 - name : Download all the dists
@@ -91,26 +72,20 @@ jobs:
9172 ./dist/*.whl
9273
9374 publish-docs :
94- name : Publish documentation 📚 to GitHub Pages
75+ name : Publish documentation to GitHub Pages
9576 needs :
9677 - github-release
9778 runs-on : ubuntu-latest
9879
9980 permissions :
100- contents : write # IMPORTANT: mandatory for deploying to GitHub Pages
81+ contents : write
10182
10283 steps :
10384 - uses : actions/checkout@v4
104-
105- - run : pipx install poetry
106-
107- - name : Set up Python
108- uses : actions/setup-python@v5
10985 with :
110- python-version : " 3.x"
111- cache : " poetry"
86+ fetch-depth : 0
11287
113- - run : poetry install --only doc
88+ - uses : astral-sh/setup-uv@v6
11489
11590 - name : Configure git for gh-pages
11691 run : |
12297
12398 - name : Build and deploy documentation
12499 run : |
125- poetry run python docs/_generate_requests_docstrings.py
126- poetry run mike deploy --push --update-aliases ${GIT_TAG} latest
100+ uv run --group doc python docs/_generate_requests_docstrings.py
101+ uv run --group doc mike deploy --push --update-aliases ${GIT_TAG} latest
0 commit comments