Skip to content

Commit cdf680f

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

2 files changed

Lines changed: 93 additions & 30 deletions

File tree

.github/workflows/build_bundle.yml

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

.github/workflows/bundle_latest.yml

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,58 @@ 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

2024
- name: Checkout main repository
2125
uses: actions/checkout@v4
2226

23-
- name: Prepare Blender install
24-
uses: gerlero/apt-install@v1
27+
- name: Get Bundle
28+
uses: actions/download-artifact@v4
2529
with:
26-
packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
30+
name: "BlendLuxCore"
31+
path: "${{ github.workspace }}/download/"
2732

28-
- name: Prepare Python
29-
run: touch requirements.txt
33+
#- name: Prepare Blender install
34+
# uses: gerlero/apt-install@v1
35+
# with:
36+
# packages: libxxf86vm1 libxfixes3 libxi6 libxkbcommon0 libgl1
3037

31-
- name: Set up Python
32-
uses: actions/setup-python@v5
33-
with:
34-
python-version: '3.11'
38+
#- name: Prepare Python
39+
# run: touch requirements.txt
3540

36-
- uses: moguri/setup-blender@v1
37-
with:
38-
blender-version: '4.2.7'
41+
#- name: Set up Python
42+
# uses: actions/setup-python@v5
43+
# with:
44+
# python-version: '3.11'
3945

40-
- uses: lukka/get-cmake@latest
46+
#- uses: moguri/setup-blender@v1
47+
# with:
48+
# blender-version: '4.2.7'
4149

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"
50-
51-
- name: Upload artifact
52-
uses: actions/upload-artifact@v4
53-
with:
54-
name: "BlendLuxCore"
55-
path: "${{ github.workspace }}/unzip/*"
50+
#- uses: lukka/get-cmake@latest
51+
52+
#- name: Package bundle
53+
# shell: bash
54+
# run: |
55+
# build_dir="${{ github.workspace }}/build"
56+
# mkdir ${build_dir}
57+
# cmake -B ${build_dir} -S . -DCMAKE_BUILD_TYPE=Latest
58+
# cmake --build ${build_dir}
59+
# unzip -q "${build_dir}/BlendLuxCore-Latest.zip" -d "${{ github.workspace }}/unzip"
60+
61+
#- name: Upload artifact
62+
# uses: actions/upload-artifact@v4
63+
# with:
64+
# name: "BlendLuxCore"
65+
# path: "${{ github.workspace }}/unzip/*"
5666

5767
- name: Update the "latest" tag
5868
uses: richardsimko/update-tag@v1
@@ -83,7 +93,7 @@ jobs:
8393
uses: softprops/action-gh-release@v2
8494
with:
8595
tag_name: latest
86-
files: ${{ github.workspace }}/build/BlendLuxCore-Latest.zip
96+
files: ${{ github.workspace }}/download/*
8797
draft: false
8898
prerelease: true
8999
body: "This is the result of automatic compilation of the latest commits.\n\nPlease note that this release may be unstable and is not recommended for production use."

0 commit comments

Comments
 (0)