build-godot-action/entrypoint.sh
2024-12-29 20:09:55 +00:00

29 lines
607 B
Bash

#!/bin/sh
set -e
# Move godot templates already installed from the docker image to home
mkdir -v -p ~/.local/share/godot/export_templates
mkdir ./Builds
# cp -a -f /root/.local/share/godot/export_templates/. ~/.local/share/godot/export_templates/
if [ "$3" != "" ]
then
echo "SubDirectories are no longer supported."
exit 1
fi
mode="export-release"
if [ "$6" = "true" ]
then
echo "Exporting in debug mode!"
mode="export-debug"
fi
# Export for project
echo "Building $1 for $2"
cd "$GITHUB_WORKSPACE/$5"
godot ./project.godot --headless --${mode} "$2"
echo "Build Done"
ls -la ./Builds