Skip to content

Commit 9045d2d

Browse files
committed
Separate reusable workflow for bundle_latest
1 parent 68472c3 commit 9045d2d

2 files changed

Lines changed: 86 additions & 31 deletions

File tree

.github/workflows/build_bundle.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-FileCopyrightText: 2025 Howetuft, Johannes Hinrichs (CodeFHD)
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
on:
6+
workflow_call:
7+
8+
jobs:
9+
build_bundle:
10+
name: Build bundle
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: Checkout main repository
16+
uses: actions/checkout@v4
17+
18+
- name: Prepare Blender install
19+
uses: gerlero/apt-install@v1
20+
with:
21+
packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
22+
23+
- name: Prepare Python
24+
run: touch requirements.txt
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.11'
30+
31+
- uses: moguri/setup-blender@v1
32+
with:
33+
blender-version: '4.2.7'
34+
35+
- uses: lukka/get-cmake@latest
36+
37+
- name: Package bundle
38+
shell: bash
39+
run: |
40+
build_dir="${{ github.workspace }}/build"
41+
mkdir ${build_dir}
42+
cmake -B ${build_dir} -S . -DCMAKE_BUILD_TYPE=Release
43+
cmake --build ${build_dir}
44+
unzip -q "${build_dir}/BlendLuxCore-*.zip" -d "${{ github.workspace }}/unzip"
45+
46+
- name: Upload artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: "BlendLuxCore"
50+
path: "${{ github.workspace }}/unzip/*"
51+
if: ${{ !env.ACT }}

.github/workflows/bundle_latest.yml

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,52 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
build_bundles:
14+
build_latest:
1515
name: Build Latest Bundle
16-
runs-on: ubuntu-latest
16+
uses: ./.github/workflows/build_bundle.yml
1717

18+
create_release:
19+
name: Create Latest Release
20+
runs-on: ubuntu-latest
21+
needs: build_latest
1822
steps:
1923

20-
- name: Checkout main repository
21-
uses: actions/checkout@v4
24+
#- name: Checkout main repository
25+
# uses: actions/checkout@v4
2226

23-
- name: Prepare Blender install
24-
uses: gerlero/apt-install@v1
25-
with:
26-
packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
27+
#- name: Prepare Blender install
28+
# uses: gerlero/apt-install@v1
29+
# with:
30+
# packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
2731

28-
- name: Prepare Python
29-
run: touch requirements.txt
32+
#- name: Prepare Python
33+
# run: touch requirements.txt
3034

31-
- name: Set up Python
32-
uses: actions/setup-python@v5
33-
with:
34-
python-version: '3.11'
35+
#- name: Set up Python
36+
# uses: actions/setup-python@v5
37+
# with:
38+
# python-version: '3.11'
3539

36-
- uses: moguri/setup-blender@v1
37-
with:
38-
blender-version: '4.2.7'
40+
#- uses: moguri/setup-blender@v1
41+
# with:
42+
# blender-version: '4.2.7'
3943

40-
- uses: lukka/get-cmake@latest
44+
#- uses: lukka/get-cmake@latest
4145

42-
- name: Package bundle
43-
shell: bash
44-
run: |
45-
build_dir="${{ github.workspace }}/build"
46-
mkdir ${build_dir}
47-
cmake -B ${build_dir} -S . -DCMAKE_BUILD_TYPE=Latest
48-
cmake --build ${build_dir}
49-
unzip -q "${build_dir}/BlendLuxCore-Latest.zip" -d "${{ github.workspace }}/unzip"
46+
#- name: Package bundle
47+
# shell: bash
48+
# run: |
49+
# build_dir="${{ github.workspace }}/build"
50+
# mkdir ${build_dir}
51+
# cmake -B ${build_dir} -S . -DCMAKE_BUILD_TYPE=Latest
52+
# cmake --build ${build_dir}
53+
# unzip -q "${build_dir}/BlendLuxCore-Latest.zip" -d "${{ github.workspace }}/unzip"
5054

51-
- name: Upload artifact
52-
uses: actions/upload-artifact@v4
53-
with:
54-
name: "BlendLuxCore"
55-
path: "${{ github.workspace }}/unzip/*"
55+
#- name: Upload artifact
56+
# uses: actions/upload-artifact@v4
57+
# with:
58+
# name: "BlendLuxCore"
59+
# path: "${{ github.workspace }}/unzip/*"
5660

5761
- name: Update the "latest" tag
5862
uses: richardsimko/update-tag@v1

0 commit comments

Comments
 (0)