Skip to content

Commit

Permalink
updated release workflow to use uv (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
fullerzz authored Nov 9, 2024
1 parent ecf5f14 commit 04dd81f
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,32 @@ jobs:
name: Build distribution 📦
runs-on: ubuntu-latest

env:
# Configure a constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache
FORCE_COLOR: 1

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1
uses: actions/setup-python@v5
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
python-version: "3.13"
- name: Load cached venv
id: cached-poetry-dependencies
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
path: /tmp/.uv-cache
key: uv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: |
pip install uv==0.5.1
uv venv
source .venv/bin/activate
uv sync --all-extras
- name: Build package distributions
run: |
poetry build
uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 04dd81f

Please sign in to comment.