diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ac29ec..fe3035c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,13 +32,10 @@ jobs: draft: false prerelease: false - build-python-sdist: - name: Build Python sdist + deploy-rust-crate: + name: Deploy Rust Crate runs-on: ubuntu-22.04 - needs: - - make-release - env: TARGET: real # "test" for tests, "real" for production @@ -58,22 +55,13 @@ jobs: python-version: '3.10' # poetry==2.1.4 has a bug - - name: Install dependencies and create source distribution + - name: Install dependencies run: | pip install poetry==2.1.3 - poetry build --format sdist + poetry install env: POETRY_VIRTUALENVS_CREATE: false - - name: Upload sdist - run: | - for file in ./dist/*; do - echo "Uploading $file..." - gh release upload "${{ github.ref_name }}" "$file" --clobber - done - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Build and publish rust crate dry-run if: env.TARGET == 'test' run: | @@ -90,6 +78,45 @@ jobs: env: CRATESIO_KEY: ${{ secrets.CRATESIO_KEY }} + build-python-sdist: + name: Build Python sdist + runs-on: ubuntu-22.04 + + needs: + - make-release + + steps: + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libclang-dev libopencv-dev + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + # poetry==2.1.4 has a bug + - name: Install dependencies and create source distribution + run: | + pip install poetry==2.1.3 + poetry build --format sdist + env: + POETRY_VIRTUALENVS_CREATE: false + + - name: Upload sdist + run: | + for file in ./dist/*; do + echo "Uploading $file..." + gh release upload "${{ github.ref_name }}" "$file" --clobber + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-python-wheels: name: Build Python Wheels strategy: