Skip to content
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
59 changes: 43 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: |
Expand All @@ -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:
Expand Down