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
Tomer Keren 64b5e9f54f
Fix prints in entrypoints
Looks like you didn't update the echos
2019-12-29 12:35:48 +02:00

33 lines
900 B
Bash

#!/bin/sh
set -e
workDir=`pwd`
# Install export templates
wget https://downloads.tuxfamily.org/godotengine/3.1.1/Godot_v3.1.1-stable_export_templates.tpz --quiet
mkdir ~/.cache
mkdir -p ~/.config/godot
mkdir -p ~/.local/share/godot/templates/3.1.1.stable
unzip Godot_v3.1.1-stable_export_templates.tpz
mv templates/* ~/.local/share/godot/templates/3.1.1.stable
rm -f Godot_v3.1.1-stable_export_templates.tpz
if [ "$3" != "" ]
then
SubDirectoryLocation="$3/"
fi
# Export for project
echo "Building $1 for $2"
mkdir -p `pwd`/build/${SubDirectoryLocation:-""}
godot --export $2 `pwd`/build/${SubDirectoryLocation:-""}$1
echo ::set-output name=build::`pwd`/build/${SubDirectoryLocation:-""}
if [ "$4" = "true" ]
then
mkdir `pwd`/package
cd `pwd`/build
zip `pwd`/package/artifact.zip ${SubDirectoryLocation:-"*"} -r
echo ::set-output name=artifact::`pwd`/package/artifact.zip
fi