1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-12-01 01:37:19 +01:00
io_scene_psk_psa/.github/workflows/main.yml
2024-06-10 13:47:23 -07:00

49 lines
1.6 KiB
YAML

name: Build Extension
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
env:
BLENDER_VERSION: blender-4.2.0-beta+v42.d19d23e91f65-linux.x86_64-release
steps:
- uses: actions/checkout@v3
- name: Set derived environment variables
run: |
echo "BLENDER_FILENAME=${{ env.BLENDER_VERSION }}.tar.xz" >> $GITHUB_ENV
echo "BLENDER_URL=https://cdn.builder.blender.org/download/daily/${{ env.BLENDER_VERSION }}.tar.xz" >> $GITHUB_ENV
- name: Install Blender Dependencies
run: |
sudo apt-get install libxxf86vm-dev -y
sudo apt-get install libxfixes3 -y
sudo apt-get install libxi-dev -y
sudo apt-get install libxkbcommon-x11-0 -y
sudo apt-get install libgl1-mesa-glx -y
- name: Download & Extract Blender
run: |
wget -q $BLENDER_URL
tar -xf $BLENDER_FILENAME
rm -rf $BLENDER_FILENAME
- name: Add Blender executable to path
run: |
echo "${{ github.workspace }}/${{ env.BLENDER_VERSION }}/" >> $GITHUB_PATH
- name: Build extension
run: |
pushd ./io_scene_psk_psa
blender --command extension build
mkdir artifact
unzip -q io_scene_psk_psa.zip -d ./artifact
popd
- name: Archive addon
uses: actions/upload-artifact@v4
with:
name: io_scene_psk_psa-${{ github.ref_name }}-${{ github.sha }}
path: |
./io_scene_psk_psa/artifact/*