-
Notifications
You must be signed in to change notification settings - Fork 30
/
entrypoint.sh
39 lines (31 loc) · 982 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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/export_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