From a8c36a5f5438b38bc53a1287f3fcc8d0522a66c0 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Fri, 29 Nov 2019 23:55:42 -0500 Subject: [PATCH] Add subdirectories --- ReadMe.md | 7 +++++++ entrypoint.sh | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 24bea5a..e5bf9a1 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -13,6 +13,7 @@ steps: - uses: josephbmanley/build-godot-action@develop env: PROJECT: godot-project + SUBDIRECTORY: project ``` ### Environment Variables @@ -23,6 +24,12 @@ steps: Eg. `godot-project` will export to `godot-project.exe` +- #### SUBDIRECTORY + + Subdirectory to export project into. + + Eg. `project` will export to `$GITHUB_WORKSPACE/build/windows/project/godot-project.exe` + ## Credits This action uses the [godot-ci](https://github.com/aBARICHELLO/godot-ci) docker image from [BARICHELLO](https://github.com/aBARICHELLO) diff --git a/entrypoint.sh b/entrypoint.sh index f1dd900..1d35a4d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,11 @@ #!/bin/sh set -e +if [ "$SUBDIRECTORY" != "" ]; then + SUBDIRECTORY = "/$SUBDIRECTORY/" +fi + + wget https://downloads.tuxfamily.org/godotengine/3.1.1/Godot_v3.1.1-stable_export_templates.tpz --quiet mkdir ~/.cache mkdir -p ~/.config/godot @@ -11,12 +16,12 @@ rm -f Godot_v3.1.1-stable_export_templates.tpz # Export for Linux mkdir -p ./build/linux -godot --export Linux/X11 ./build/linux/${PROJECT} +godot --export Linux/X11 ./build/linux/${SUBDIRECTORY}${PROJECT} # Export for Windows mkdir -p ./build/windows -godot --export "Windows Desktop" ./build/windows/${PROJECT}.exe +godot --export "Windows Desktop" ./build/windows/${SUBDIRECTORY}${PROJECT}.exe # Export for OSX mkdir -p ./builds/mac -godot --export "Mac OSX" ./build/mac/${PROJECT} \ No newline at end of file +godot --export "Mac OSX" ./build/mac/${SUBDIRECTORY}${PROJECT} \ No newline at end of file