Add subdirectories

This commit is contained in:
Joseph Manley 2019-11-29 23:55:42 -05:00
parent 0c6b5de12f
commit a8c36a5f54
2 changed files with 15 additions and 3 deletions

View file

@ -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)

View file

@ -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}
godot --export "Mac OSX" ./build/mac/${SUBDIRECTORY}${PROJECT}