Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Release CI Workflow to Use uv #46

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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