From 18c54ba7f2c08dd51f07a39b1cbee9efc73b528c Mon Sep 17 00:00:00 2001 From: yeger00 Date: Sun, 5 Jan 2025 10:11:56 +0200 Subject: [PATCH] Fix publish --- .github/workflows/publish.yaml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9103b4f..e6bae44 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,6 +3,7 @@ name: Publish to PyPI "on": release: types: [published] + workflow_dispatch: jobs: deploy: @@ -14,22 +15,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install UV - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - - name: Set up Python - uses: actions/setup-python@v5 + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v5 with: - python-version: "3.11" + version: "0.5.x" + python-version: 3.11 + enable-cache: true + cache-dependency-glob: "uv.lock" - - name: Install build dependencies + - name: Build run: | - uv pip install build - - - name: Build package - run: python -m build + uv build - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Publish + run: uv publish + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}