From fce988687b3dc6fc36ce9244a8c2744f4a25d561 Mon Sep 17 00:00:00 2001 From: PeriniM Date: Thu, 2 Jan 2025 18:32:47 +0100 Subject: [PATCH] fix: uv virtual env --- .github/workflows/release.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b945a95..bbf16129 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,20 +25,23 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Remove Hardcoded Version (if present) + - name: Create Virtual Environment run: | - sed -i '/^version =/d' pyproject.toml - - name: Update Dependencies + uv venv + - name: Activate Virtual Environment and Install Dependencies run: | + source .venv/bin/activate # For Linux/macOS. Use .venv\Scripts\activate for Windows + uv sync --frozen uv pip install --upgrade setuptools wheel hatchling twine - name: Build app run: | - uv sync --frozen + source .venv/bin/activate # Activate the virtual environment again if needed uv build id: build_cache if: success() - name: Validate Metadata run: | + source .venv/bin/activate uv run twine check dist/* - name: Debug Dist Directory run: | @@ -70,6 +73,9 @@ jobs: with: fetch-depth: 0 persist-credentials: false + - name: Restore Virtual Environment + run: | + source .venv/bin/activate - name: Semantic Release uses: cycjimmy/semantic-release-action@v4.1.0 with: