@@ -16,55 +16,26 @@ jobs:
1616 - uses : actions/checkout@v4
1717
1818 # We use Python 3.10 here because it's the minimum Python version supported by this library.
19- - name : Setup Python 3 .10
20- uses : actions /setup-python@v5
19+ - name : setup Python v3 .10 with uv
20+ uses : astral-sh /setup-uv@v6
2121 with :
2222 python-version : ' 3.10'
2323
24- - name : Install dependencies
25- run : pip install --upgrade pip build
24+ - name : install packages
25+ run : uv pip install -r pyproject.toml --extra testing --system
2626
2727 - name : Build package
28- run : python -m build
28+ run : uv build
2929
3030 - name : Upload build artifacts
3131 uses : actions/upload-artifact@v4
3232 with :
3333 name : dist_packages
3434 path : dist/
3535
36- test :
37- # This job tests the built package by installing it via pip and running unit tests (without tox).
38- name : Test package
39- needs : build
40- runs-on : ubuntu-latest
41-
42- steps :
43- - uses : actions/checkout@v4
44-
45- - name : setup Python v3.10 with uv
46- uses : astral-sh/setup-uv@v6
47- with :
48- python-version : ' 3.10'
49-
50- - name : install packages
51- run : uv pip install -r pyproject.toml --extra testing
52-
53- - name : Download build artifacts
54- uses : actions/download-artifact@v4
55- with :
56- name : dist_packages
57- path : dist/
58-
59- - name : Install built package
60- run : pip install dist/xml2python-*.whl
61-
62- - name : Run unit tests
63- run : python -m pytest
64-
6536 publish :
6637 name : Publish package
67- needs : test
38+ needs : build
6839 runs-on : ubuntu-latest
6940
7041 steps :
7849 uses : AButler/upload-release-assets@v3.0
7950 with :
8051 files : dist/*
81- repo-token : ${{ secrets.GITHUB_TOKEN }}
52+ repo-token : ${{ secrets.PYPI_API_TOKEN }}
8253
8354 - name : Publish package to PyPI
8455 uses : pypa/gh-action-pypi-publish@v1.12.4
0 commit comments