change build test to use setup-blender action (#700) #287
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, 4.3] | |
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' | |
- uses: BradyAJohnston/setup-blender@v2 | |
with: | |
version: ${{ matrix.version }} | |
- name: Build extension | |
run: | | |
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 }}-build_${{ matrix.version }}-${{ github.sha }} | |
retention-days: 3 | |
path: | | |
./artifact/* |