Skip to content

Commit

Permalink
build: Update workflow steps to use uv tool for dependencies and …
Browse files Browse the repository at this point in the history
…distribution
  • Loading branch information
Spartan-71 committed Dec 30, 2024
1 parent 94a3687 commit 771cf5f
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,36 +67,39 @@ jobs:
fi
setup_and_build:
needs: [details, check_pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install dependancies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt
- name: Set project version dynamically
run: |
new_version="${{ needs.details.outputs.new_version }}"
sed -i "s/version=.*/version='${new_version}',/" setup.py
- name: Build source and wheel distribution
run: |
python setup.py sdist
python setup.py bdist_wheel
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
needs: [details, check_pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install uv
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install uv
- name: Install dependencies using uv
run: |
uv sync --file uv-lock.yaml
- name: Set project version dynamically
run: |
new_version="${{ needs.details.outputs.new_version }}"
sed -i "s/^version = .*/version = \"${new_version}\"/" pyproject.toml
- name: Build source and wheel distribution using uv
run: |
uv build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

pypi_publish:
name: Upload release to PyPI
Expand Down

0 comments on commit 771cf5f

Please sign in to comment.