Migrate to UV (#1748)

* Switch to using `uv` for dependency management and update related project workflows and scripts

* Expand contributing documentation with instructions for using `uv`, including dependency management, testing, linting, and docs workflows.

* Add changelog entry for migration to `uv` for dependency management and workflows
This commit is contained in:
Alex Root Junior 2026-01-02 01:27:37 +02:00 committed by GitHub
parent 7201e82238
commit ce4ddb77f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 3203 additions and 149 deletions

View file

@ -10,25 +10,22 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python 3.11
uses: actions/setup-python@v5
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.14"
- name: Install build dependencies
run: python -m pip install --upgrade build
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Resolve version
id: package-version
run: echo "value=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\/v//')" >> $GITHUB_OUTPUT
# - name: Bump version
# run: hatch version ${{ steps.package-version.outputs.value }}
- name: Build source distribution
run: python -m build .
- name: Build distribution
run: uv build
- name: Try install wheel
run: |
@ -39,7 +36,7 @@ jobs:
venv/bin/pip install ../dist/aiogram-*.whl
venv/bin/python -c "import aiogram; print(aiogram.__version__)"
- name: Publish artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: dist
path: dist/*
@ -55,7 +52,7 @@ jobs:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: dist
path: dist