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:16:27 +03:00

34 lines
656 B
Bash

#!/bin/sh
set -e
# Move godot templates already installed from the docker image to home
mv /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 ~/package
cd ~/build
zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r
echo ::set-output name=artifact::~/package/artifact.zip
fi