Skip to content

Commit a6efdce

Browse files
committed
Start working on CI fix
1 parent eece5a5 commit a6efdce

2 files changed

Lines changed: 32 additions & 17 deletions

File tree

‎.github/workflows/pipeline.yml‎

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,45 @@ jobs:
1717
outputs:
1818
nmsdk_version: ${{ steps.get_nmsdk_version.outputs.version }}
1919
steps:
20-
- uses: actions/checkout@v4
21-
- name: Set up Python 3.9
22-
uses: actions/setup-python@v5
20+
- uses: actions/checkout@v6
21+
- name: Set up Python 3.11
22+
uses: actions/setup-python@v6
2323
with:
24-
python-version: "3.9"
24+
python-version: "3.11"
2525
- name: Install dependencies
2626
run: python -m pip install flake8 mkdocs
2727
- name: Build docs
2828
run: mkdocs build
29-
# TODO: This needs to be fixed. Probably pull blenderkit/headless-blender:blender-5.0 and use it for building...
30-
- name: Build release
29+
- name: Install blender
3130
run: |
32-
python ./tools/build.py
33-
Expand-Archive build/nmsdk.zip -DestinationPath ./nmsdk
31+
BLENDER_EXACT_VERSION="5.1.2"
32+
BLENDER_GENERAL_VERSION="5.1"
33+
BLENDER_ARCHIVE="blender-${BLENDER_EXACT_VERSION}-windows-x64.zip"
34+
BLENDER_URL="https://download.blender.org/release/Blender${BLENDER_GENERAL_VERSION}/${BLENDER_ARCHIVE}"
35+
curl -L ${BLENDER_URL} -o ${BLENDER_ARCHIVE}
36+
unzip -qq ${BLENDER_ARCHIVE}
37+
mv blender-${BLENDER_EXACT_VERSION}-windows-x64 blender
38+
ls blender
39+
shell: bash
40+
- name: Build release
41+
run: ./blender/blender.exe --command extension build --source-dir "src\addon\nmsdk"
3442
- name: Get NMSDK tag version
3543
id: get_nmsdk_version
36-
run: echo "version=$(Tools/read_nmsdk_version.sh)" >> $GITHUB_OUTPUT
44+
run: |
45+
VERSION=$(python get_version.py)
46+
echo $VERSION
47+
echo "version=$VERSION" >> $GITHUB_OUTPUT
3748
shell: bash
3849
- name: Upload plugin zip for release
39-
uses: actions/upload-artifact@v4
40-
with:
41-
name: NMSDK
42-
path: nmsdk
43-
- name: Upload website for release
44-
uses: actions/upload-artifact@v4
50+
uses: actions/upload-artifact@v7
4551
with:
46-
name: NMSDK_site
47-
path: html_docs/*
52+
path: nmsdk-${{ env.version }}.zip
53+
archive: false
54+
# - name: Upload website for release
55+
# uses: actions/upload-artifact@v7
56+
# with:
57+
# name: NMSDK_site
58+
# path: html_docs/*
4859
release:
4960
name: Release NMSDK zip and publish docs
5061
# Only run this job if the commit was tagged.

‎get_version.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import tomllib
2+
3+
with open("src/addon/nmsdk/blender_manifest.toml", "rb") as f:
4+
print(tomllib.load(f)["version"])

0 commit comments

Comments
 (0)