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: Renders BLEND in PNG and attach to release | |
on: | |
release: | |
types: [created] | |
jobs: | |
convert_and_upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Blender 4.1.1 | |
run: | | |
wget https://mirrors.sahilister.in/blender/release/Blender4.1/blender-4.1.1-linux-x64.tar.xz -O blender.tar.xz | |
mkdir blender_bin | |
tar -xf blender.tar.xz --strip-components=1 -C ./blender_bin | |
chmod u+x blender_bin/blender | |
sudo apt-get install -y libegl1-mesa libgl1-mesa-glx | |
- name: Render BLEND in PNG | |
run: | | |
for bld in $(find . -maxdepth 1 -name "*.blend"); do | |
echo "Rendering $bld" | |
./blender_bin/blender -noaudio -b "$bld" -o // -f 1 && mv ./0001.png "$(basename "$bld" .blend).png" | |
done | |
- name: List and upload PNGs | |
run: | | |
for png in $(find . -maxdepth 1 -name "*.png"); do | |
echo "Uploading $png" | |
gh release upload ${{ github.event.release.tag_name }} "$png" --repo $GITHUB_REPOSITORY | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |