diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index b2a11fc..af4a1c3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -5,21 +5,31 @@ on: tags: - 'v*' - jobs: - update-database: + publish: + name: Build and Publish to PyPI runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write # Required for trusted publishing + steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: install build deps - run: python -m pip install -U pip build - - name: build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v4 with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Set up Python + run: uv python install + + - name: Install build dependencies + run: uv sync --all-extras + + - name: Build the project + run: uv build + + - name: Publish to PyPI + run: uv publish