Bump version #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: 'requirements-dev.txt' | |
- name: Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Check version | |
run: | | |
[[ $(python setup.py --version) = ${GITHUB_REF/refs\/tags\/v/} ]] || exit 1 | |
build: | |
strategy: | |
matrix: | |
os: [macos-13, macos-latest, windows-latest] | |
include: | |
- os: macos-13 | |
blender-install: | | |
brew update | |
brew install --cask blender | |
filename-match: "dist/*-macos_x64.zip" | |
- os: macos-latest | |
blender-install: | | |
brew update | |
brew install --cask blender | |
filename-match: "dist/*-macos_arm64.zip" | |
- os: windows-latest | |
blender-install: | | |
choco install blender --version=4.2.2 | |
echo "C:\Program Files\Blender Foundation\Blender 4.2\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
filename-match: "dist/*-windows_x64.zip" | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
needs: check-version | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: 'requirements-dev.txt' | |
- name: Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Build | |
run: python setup.py build_rust --inplace --release | |
- name: Install Blender | |
run: ${{ matrix.blender-install }} | |
- name: Package addon into Blender extension | |
run: | | |
mkdir -p dist | |
blender --command extension build --source-dir ./plumber --output-dir ./dist --split-platforms | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
fail_on_unmatched_files: true | |
files: ${{ matrix.filename-match }} | |
build-manylinux: | |
runs-on: ubuntu-latest | |
container: quay.io/pypa/manylinux_2_28_x86_64 | |
needs: check-version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Python version | |
run: echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: Build | |
run: python setup.py build_rust --inplace --release | |
- name: Install Blender | |
run: | | |
dnf install -y wget libXi | |
wget https://download.blender.org/release/Blender4.2/blender-4.2.3-linux-x64.tar.xz | |
tar -xf blender-4.2.3-linux-x64.tar.xz | |
echo "$PWD/blender-4.2.3-linux-x64" >> $GITHUB_PATH | |
- name: Package addon into Blender extension | |
run: | | |
mkdir -p dist | |
blender --command extension build --source-dir ./plumber --output-dir ./dist --split-platforms | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
fail_on_unmatched_files: true | |
files: "dist/*-linux_x64.zip" |