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
2020-04-04 15:38:52 +03:00

34 lines
662 B
Bash

#!/bin/sh
set -e
# Move godot templates already installed from the docker image to home
mv -n /root/.local ~
if [ "$3" != "" ]
then
SubDirectoryLocation="$3/"
fi
mode="export"
if [ "$6" = "true" ]
then
mode="export-debug"
fi
# Export for project
echo "Building $1 for $2"
mkdir -p ~/build/${SubDirectoryLocation:-""}
cd ${5-"~"}
godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1
cd ~
echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
if [ "$4" = "true" ]
then
mkdir -p ~/package
cd ~/build
zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r
echo ::set-output name=artifact::~/package/artifact.zip
fi