Changes testing to use the new setup-blender
GHA (#696)
#272
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: Build Extension | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: macos-14 | |
strategy: | |
matrix: | |
version: [4.2] | |
env: | |
ADDON_NAME: molecularnodes | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: SebRollen/[email protected] | |
id: read_manifest | |
with: | |
file: '${{ env.ADDON_NAME }}/blender_manifest.toml' | |
field: 'version' | |
- name: Test in Blender MacOS ARM | |
run: | | |
curl -L -o blender.dmg https://download.blender.org/release/Blender${{ matrix.version }}/blender-${{ matrix.version }}.0-macos-arm64.dmg | |
hdiutil attach blender.dmg | |
cp -R /Volumes/Blender/Blender.app /Applications/ | |
hdiutil detach /Volumes/Blender | |
/Applications/Blender.app/Contents/MacOS/Blender --version | |
- name: Build extension | |
run: | | |
/Applications/Blender.app/Contents/MacOS/Blender -b -P build.py | |
mkdir artifact | |
mv ${{ env.ADDON_NAME }}-${{ steps.read_manifest.outputs.value }}-*.zip ./artifact/. | |
- name: Archive addon | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ADDON_NAME }}-${{ github.sha }} | |
retention-days: 3 | |
path: | | |
./artifact/* |