@@ -15,23 +15,22 @@ jobs:
1515 steps :
1616 - uses : actions/checkout@v3
1717
18- - name : Use Python ${{ env.pythonVersion }}
19- uses : actions /setup-python@v3
18+ - name : Install uv
19+ uses : astral-sh /setup-uv@v4
2020 with :
21- python-version : ${{ env.pythonVersion }}
22- architecture : x64
21+ version : " latest"
2322
24- - name : Install Poetry
25- run : pip install --user poetry
23+ - name : Set up Python ${{ env.pythonVersion }}
24+ run : uv python install ${{ env.pythonVersion }}
2625
2726 - name : Install dependencies
28- run : poetry install
27+ run : uv sync --dev
2928
3029 - name : Run Tests
31- run : poetry run pytest tests/
30+ run : uv run pytest tests/
3231
3332 - name : Run Linter
34- run : poetry run flake8 src/
33+ run : uv run flake8 src/
3534
3635 publish :
3736 name : " Deploy package to PyPI"
@@ -41,23 +40,24 @@ jobs:
4140 steps :
4241 - uses : actions/checkout@v3
4342
44- - name : Use Python ${{ env.pythonVersion }}
45- uses : actions /setup-python@v3
43+ - name : Install uv
44+ uses : astral-sh /setup-uv@v4
4645 with :
47- python-version : ${{ env.pythonVersion }}
48- architecture : x64
46+ version : " latest"
4947
50- - name : Install Poetry
51- run : pip install --user poetry
48+ - name : Set up Python ${{ env.pythonVersion }}
49+ run : uv python install ${{ env.pythonVersion }}
5250
5351 - name : Install dependencies
54- run : poetry install
52+ run : uv sync --dev
53+
54+ - name : Build package
55+ run : uv build
5556
5657 - name : Publish to PyPI
5758 env :
58- PYPI_USERNAME : ${{ secrets.PYPI_USERNAME }}
59- PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
60- run : poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
59+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
60+ run : uv publish --token $PYPI_TOKEN
6161
6262 docs :
6363 name : " Deploy Docs"
@@ -69,17 +69,16 @@ jobs:
6969 persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
7070 fetch-depth : 0 # otherwise, you will failed to push refs to dest repo
7171
72- - name : Use Python ${{ env.pythonVersion }}
73- uses : actions /setup-python@v3
72+ - name : Install uv
73+ uses : astral-sh /setup-uv@v4
7474 with :
75- python-version : ${{ env.pythonVersion }}
76- architecture : x64
75+ version : " latest"
7776
78- - name : Install Poetry
79- run : pip install --user poetry
77+ - name : Set up Python ${{ env.pythonVersion }}
78+ run : uv python install ${{ env.pythonVersion }}
8079
8180 - name : Install dependencies
82- run : poetry install
81+ run : uv sync --dev
8382
8483 - name : Create local changes
8584 run : |
0 commit comments