This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test for template build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# build-templates: | |
# uses: ./.github/workflows/godot-template-build.yml | |
# with: | |
# version: 4.3 | |
# secrets: inherit | |
build-project: | |
runs-on: ubuntu-latest | |
# needs: build-templates | |
container: barichello/godot-ci:4.3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Templates | |
uses: ./setup | |
with: | |
version: 4.3 | |
channel: linux | |
encryption-key: ${{ secrets.ENCRYPTION_KEY }} | |
game-folder: godot-game | |
- name: Build Project | |
run: | | |
mkdir -p build/linux | |
godot --export-release --headless --path godot-game linux "../build/linux/main.x86_64" | |
echo "Exported godot game with following settings: " | |
cat godot-game/export_presets.cfg | |
cat godot-game/.godot/export_credentials.cfg | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: game-build | |
path: build/linux/* | |
if-no-files-found: error | |
run-game: | |
runs-on: ubuntu-latest | |
needs: build-project | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: game-build | |
- run: ls game-build | |
- name: Run Game | |
run: | | |
./game-build/main.x86_64 > result.txt | |
OUTPUT=$(echo result.txt | grep "GAME SUCCESSFUL") | |
if [ -z "$OUTPUT" ]; then | |
echo "Game failed" | |
exit 1 | |
fi |