diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 30f2bc2f..e6191e8a 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -20,20 +20,28 @@ jobs: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@v1.8.4 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Set up Python ${{ matrix.python-version }} + run: uv python install ${{ matrix.python-version }} + + - name: Install the project + run: uv sync --all-extras --dev + + - name: Run tests + # For example, using `pytest` + run: uv run pytest + + - name: Run build + run: uv build + + - name: Publish package + uses: pypa/gh-action-pypi-publish@v1.8.4 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}