This repository has been archived on 2024-11-15. You can view files and clone it, but cannot push or open issues or pull requests.
build-godot-action/entrypoint.sh
Bioblaze Payne f362e14dc5
Update entrypoint.sh (#22)
* Update entrypoint.sh

* Update entrypoint.sh

* modified to support proper requirements for godot-ci project

* Modified for testing

* added a copy of the action for testing

* test

* added ls

* added ls debug

* modified ls debug

* Last push fixes the issue with not building, both build tests work

* Modified it so we showcase Support for Testing 3.x and 4.x Godot Projects

* Modified the Github Action names to properly reflect the tests
2023-07-10 15:31:28 -04:00

39 lines
975 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
cp -a /root/.local/share/godot/templates/. ~/.local/share/godot/export_templates/
if [ "$3" != "" ]
then
SubDirectoryLocation="$3/"
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"
mkdir -p $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}
cd "$GITHUB_WORKSPACE/$5"
godot --headless --${mode} "$2" $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}$1
echo "Build Done"
echo ::set-output name=build::build/${SubDirectoryLocation:-""}
if [ "$4" = "true" ]
then
echo "Packing Build"
mkdir -p $GITHUB_WORKSPACE/package
cd $GITHUB_WORKSPACE/build
zip $GITHUB_WORKSPACE/package/artifact.zip ${SubDirectoryLocation:-"."} -r
echo ::set-output name=artifact::package/artifact.zip
echo "Done"
fi