Skip to content

Fix Tex3D Blend node #5114

Fix Tex3D Blend node

Fix Tex3D Blend node #5114

name: "Build Material Maker"
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
inputs:
artifacts:
description: "Generate artifacts"
type: boolean
required: true
default: "false"
sign_macos:
description: "Sign macOS version"
type: boolean
required: true
default: "false"
gen_doc:
description: "Generate documentation"
type: boolean
required: true
default: "true"
steam:
description: "Generate Steam version"
type: boolean
required: true
default: "false"
steam_deploy:
description: "Upload Steam version"
type: boolean
required: true
default: "false"
env:
GODOT_VERSION: 4.7
GODOT_SUB: stable
GODOT_DOWNLOAD_DIR: https://github.com/godotengine/godot-builds/releases/download/4.7-stable
EXPORT_NAME: material_maker
MM_RELEASE: 1_7
EXPORT_TARGET_SUFFIX: "${{ github.event.inputs.steam == 'true' && ' Steam' || '' }}"
PACKAGE_SUFFIX: "${{ github.event.inputs.steam == 'true' && '_steam' || '' }}"
jobs:
export_windows_linux:
name: Export Windows and Linux 🗔
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
cp -f material_maker/theme/default_theme_icons.svg material_maker/theme/default_theme_icons_export.svg
wget -q ${GODOT_DOWNLOAD_DIR}/Godot_v${GODOT_VERSION}-${GODOT_SUB}_linux.x86_64.zip
unzip Godot_v${GODOT_VERSION}-${GODOT_SUB}_linux.x86_64.zip
wget -q ${GODOT_DOWNLOAD_DIR}/Godot_v${GODOT_VERSION}-${GODOT_SUB}_export_templates.tpz
unzip -a Godot_v${GODOT_VERSION}-${GODOT_SUB}_export_templates.tpz
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_SUB}
mv ./templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_SUB}
mkdir -v -p build/${EXPORT_NAME}_${MM_RELEASE}_windows build/${EXPORT_NAME}_${MM_RELEASE}_linux
- name: Generate Documentation
if: ${{ github.event.inputs.gen_doc == 'true' }}
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "material_maker/doc"
- name: Windows Build 🗔
run: |
./Godot_v${GODOT_VERSION}-${GODOT_SUB}_linux.x86_64 --headless -v --export-release "Windows${EXPORT_TARGET_SUFFIX}" ./build/${EXPORT_NAME}_${MM_RELEASE}_windows/$EXPORT_NAME.exe
- name: Linux Build 🐧
run: |
./Godot_v${GODOT_VERSION}-${GODOT_SUB}_linux.x86_64 --headless -v --export-release "Linux/X11${EXPORT_TARGET_SUFFIX}" ./build/${EXPORT_NAME}_${MM_RELEASE}_linux/$EXPORT_NAME.x86_64
- name: Copy Material Maker data 📁
run: |
cp -R ./addons/material_maker/nodes ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/environments ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/examples ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/library ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/meshes ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/misc/export ./build/${EXPORT_NAME}_${MM_RELEASE}_windows
cp -R ./material_maker/doc/_build/html ./build/${EXPORT_NAME}_${MM_RELEASE}_windows/doc || :
cp -R ./addons/material_maker/nodes ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/environments ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/examples ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/library ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/meshes ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/misc/export ./build/${EXPORT_NAME}_${MM_RELEASE}_linux
cp -R ./material_maker/doc/_build/html ./build/${EXPORT_NAME}_${MM_RELEASE}_linux/doc || :
- name: Create archives 📁
run: |
cd build
zip -r ${EXPORT_NAME}_${MM_RELEASE}_windows${PACKAGE_SUFFIX}.zip ${EXPORT_NAME}_${MM_RELEASE}_windows
tar zcvf ${EXPORT_NAME}_${MM_RELEASE}_linux${PACKAGE_SUFFIX}.tar.gz ${EXPORT_NAME}_${MM_RELEASE}_linux
- name: Upload Documentation 🚀
if: ${{ github.event.inputs.gen_doc == 'true' && github.event.inputs.artifacts == 'true' }}
uses: actions/upload-artifact@v6
with:
name: documentation
path: ./material_maker/doc/_build/html
- name: Upload Windows Artifact 🚀
if: ${{ github.event.inputs.steam == 'false' && github.event.inputs.artifacts == 'true' }}
uses: actions/upload-artifact@v6
with:
name: windows_snapshot
path: build/${{ env.EXPORT_NAME }}_${{ env.MM_RELEASE }}_windows${{ env.PACKAGE_SUFFIX }}.zip
- name: Upload Windows Artifact (Steam) 🚀
if: ${{ github.event.inputs.steam == 'true' }}
uses: actions/upload-artifact@v6
with:
name: windows_snapshot
path: build/${{ env.EXPORT_NAME }}_${{ env.MM_RELEASE }}_windows
- name: Upload Linux Artifact 🚀
if: ${{ github.event.inputs.steam == 'false' && github.event.inputs.artifacts == 'true' }}
uses: actions/upload-artifact@v6
with:
name: linux_snapshot
path: build/${{ env.EXPORT_NAME }}_${{ env.MM_RELEASE }}_linux${{ env.PACKAGE_SUFFIX }}.tar.gz
- name: Upload Linux Artifact (Steam) 🚀
if: ${{ github.event.inputs.steam == 'true' }}
uses: actions/upload-artifact@v6
with:
name: linux_snapshot
path: build/${{ env.EXPORT_NAME }}_${{ env.MM_RELEASE }}_linux
export_macos:
name: Mac Export 🍎
needs: export_windows_linux
runs-on: macos-26
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup environment 🔧
run: |
cp -f material_maker/theme/default_theme_icons.svg material_maker/theme/default_theme_icons_export.svg
export GODOT_VERSION=${GODOT_VERSION}
export EXPORT_NAME=material_maker
- name: Install the Apple certificate and provisioning profile
if: ${{ github.event.inputs.sign_macos == 'true' }}
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: "${{ secrets.KEYCHAIN_PASSWORD }}"
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Download and extract Godot and export templates 💾
run: |
wget ${GODOT_DOWNLOAD_DIR}/Godot_v${GODOT_VERSION}-${GODOT_SUB}_macos.universal.zip
unzip -a Godot_v${GODOT_VERSION}-${GODOT_SUB}_macos.universal.zip
wget ${GODOT_DOWNLOAD_DIR}/Godot_v${GODOT_VERSION}-${GODOT_SUB}_export_templates.tpz
unzip -a Godot_v${GODOT_VERSION}-${GODOT_SUB}_export_templates.tpz
mkdir -v -p "/Users/runner/Library/Application Support/Godot/export_templates/${GODOT_VERSION}.${GODOT_SUB}"
mv ./templates/* "/Users/runner/Library/Application Support/Godot/export_templates/${GODOT_VERSION}.${GODOT_SUB}"
- name: Mac Build 🔧
run: |
chown runner Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
mkdir -v -p ./build/mac
Godot.app/Contents/MacOS/Godot --headless -v --export-release "Mac OSX${EXPORT_TARGET_SUFFIX}" ./build/mac/material_maker.zip
- name: Make application executable 🔧
run: |
unzip -a ./build/mac/material_maker.zip -d ./build/mac
chmod +x "./build/mac/Material Maker.app/Contents/MacOS/Material Maker"
rm ./build/mac/material_maker.zip
- name: Get documentation 🚀
if: ${{ github.event.inputs.gen_doc == 'true' && github.event.inputs.artifacts == 'true' }}
uses: actions/download-artifact@v8
with:
name: documentation
path: doc
- name: Copy data folder 📁
run: |
cp -R ./addons/material_maker/nodes "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./material_maker/environments "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./material_maker/examples "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./material_maker/library "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./material_maker/meshes "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./material_maker/misc/export "./build/mac/Material Maker.app/Contents/MacOS"
cp -R ./doc "./build/mac/Material Maker.app/Contents/MacOS/doc" || :
- name: Ad-hoc signing ✍️
if: ${{ github.event.inputs.sign_macos != 'true' }}
run: |
codesign -s - --force --deep "./build/mac/Material Maker.app"
- name: Signing ✍️
if: ${{ github.event.inputs.sign_macos == 'true' }}
run: |
codesign -s "Rodolphe Suescun" --force --timestamp --options runtime --deep "./build/mac/Material Maker.app"
- name: Create DMG archive 🔧
if: ${{ github.event.inputs.steam == 'false' }}
run: |
brew untap aws/tap || true
brew install imagemagick
cp ./.github/workflows/create-dmg-bg.sh .
chmod +x create-dmg-bg.sh
./create-dmg-bg.sh ./splash_screen/backgrounds/pavel_oliva_vintage_luggage.png ./bg.png
#hdiutil create -srcfolder ./build/mac -fs HFS+ -volname material_maker material_maker_${MM_RELEASE}${PACKAGE_SUFFIX}.dmg
wget https://github.com/create-dmg/create-dmg/archive/refs/tags/v1.2.2.zip
unzip v1.2.2.zip
create-dmg-1.2.2/create-dmg --volname "Material Maker" --icon-size 128 --background ./bg.png --window-size 540 330 --icon "Material Maker.app" 158 125 --app-drop-link 384 125 --hide-extension "Material Maker.app" ./build/mac/material_maker_${MM_RELEASE}${PACKAGE_SUFFIX}.dmg ./build/mac
ls
- name: Notarizing ✍️
if: ${{ github.event.inputs.steam == 'false' && github.event.inputs.sign_macos == 'true' }}
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
NOTARYTOOL_APP_PASSWORD: ${{ secrets.NOTARYTOOL_APP_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
xcrun notarytool submit ./build/mac/material_maker_${MM_RELEASE}${PACKAGE_SUFFIX}.dmg --apple-id $APPLE_ID --password $NOTARYTOOL_APP_PASSWORD --team-id $APPLE_TEAM_ID --wait
xcrun stapler staple -v ./build/mac/material_maker_${MM_RELEASE}${PACKAGE_SUFFIX}.dmg
- name: Upload Mac OSX Artifact 🚀
if: ${{ github.event.inputs.steam == 'false' && github.event.inputs.artifacts == 'true' }}
uses: actions/upload-artifact@v6
with:
name: macos_snapshot
path: ./build/mac/material_maker_${{ env.MM_RELEASE }}${{ env.PACKAGE_SUFFIX }}.dmg
- name: Upload Mac OSX Artifact (Steam) 🚀
if: ${{ github.event.inputs.steam == 'true' }}
uses: actions/upload-artifact@v6
with:
name: macos_snapshot
path: ./build/mac
deploy_to_steam:
name: Steam deploy 🎮
runs-on: ubuntu-latest
needs: export_macos
if: ${{ github.event.inputs.steam_deploy == 'true' }}
steps:
- name: Get Windows build 🚀
uses: actions/download-artifact@v8
with:
name: windows_snapshot
path: build/windows
- name: Get Linux build 🚀
uses: actions/download-artifact@v8
with:
name: linux_snapshot
path: build/linux
- name: Get Macos build 🚀
uses: actions/download-artifact@v8
with:
name: macos_snapshot
path: build/macos
- name: Prepare packages 🔧
run: |
find .
- uses: game-ci/steam-deploy@v3
with:
username: ${{ secrets.STEAM_USERNAME }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
appId: 4110830
buildDescription: v1.7
rootPath: build
depot1Path: windows
depot2Path: macos
depot3Path: linux
releaseBranch: prerelease