0.4.3 - Blender 4.1+ #17
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: Compile Release | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Build | |
run: cargo build --release | |
- name: Create Release Zip | |
run: | | |
cp target/release/libldr_tools_py.so ldr_tools_blender/ldr_tools_py.so | |
zip -r ldr_tools_blender_linux_x64.zip ldr_tools_blender | |
- name: Upload Zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ldr_tools_blender_linux | |
path: ldr_tools_blender_linux_x64.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ldr_tools_blender_linux_x64.zip | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Build | |
run: cargo build --release | |
- name: Create Release Zip | |
run: | | |
cp target/release/ldr_tools_py.dll ldr_tools_blender/ldr_tools_py.pyd | |
Compress-Archive -path ldr_tools_blender -destinationPath ldr_tools_blender_win_x64.zip | |
- name: Upload Zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ldr_tools_blender_win | |
path: ldr_tools_blender_win_x64.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ldr_tools_blender_win_x64.zip | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
build-macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [x86_64-apple-darwin] | |
desc: [intel] | |
include: | |
- target: aarch64-apple-darwin | |
desc: apple_silicon | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Install maturin | |
run: | | |
python -m pip install --upgrade pip | |
pip install maturin | |
- name: Install Rust Toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: ${{matrix.target}} | |
- name: Build | |
run: | | |
cd ldr_tools_py | |
maturin build --release --target=${{matrix.target}} | |
cd .. | |
- name: Create Release Zip | |
run: | | |
cp target/${{matrix.target}}/release/libldr_tools_py.dylib ldr_tools_blender/ldr_tools_py.so | |
zip -r ldr_tools_blender_macos_${{matrix.desc}}.zip ldr_tools_blender | |
- name: Upload Zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ldr_tools_blender_macos_${{matrix.desc}} | |
path: ldr_tools_blender_macos_${{matrix.desc}}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ldr_tools_blender_macos_${{matrix.desc}}.zip | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |