diff --git a/.github/workflows/godot-build-artifact.yml b/.github/workflows/godot-build-artifact.yml index 4ef8d4b81..477c54dbc 100644 --- a/.github/workflows/godot-build-artifact.yml +++ b/.github/workflows/godot-build-artifact.yml @@ -25,37 +25,10 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 # Runs a set of commands using the runners shell - - name: Download Godot and export templates + - name: Build everything run: | - sudo apt install unzip - sudo apt install tree - echo *** Downloading Godot Binary *** - wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_linux_headless.64.zip - echo *** Downloading Godot Server Export Templates *** - wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_export_templates.tpz - echo *** Unzipping Godot Binary *** - unzip Godot_v3.2.4-rc3_linux_headless.64.zip - echo *** Unzipping Godot Server Export Templates *** - unzip Godot_v3.2.4-rc3_export_templates.tpz - echo *** Installing Godot Server Export Templates *** - cd /home/runner/ - sudo mkdir -p .local/share/godot - cd .local/share/godot - sudo mkdir -p templates/3.2.4.rc3 - sudo cp -r $GITHUB_WORKSPACE/templates/* templates/3.2.4.rc3 - echo *** Exporting Files *** - cd $GITHUB_WORKSPACE - sudo mkdir -p builds/{x11-64-standard,win-64-standard,osx-standard} - - name: Export x11-64 - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "x11-64" $GITHUB_WORKSPACE/builds/x11-64-standard/FoxyAdventure.x86_64 - - name: Export osx - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "osx" $GITHUB_WORKSPACE/builds/osx-standard/FoxyAdventure.zip - - name: Export win-64 - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "win-64" $GITHUB_WORKSPACE/builds/win-64-standard/FoxyAdventure.exe - tree -a + sudo chmod +x ./build_game.sh + ./build_game.sh - name: Upload a Build Artifact x11-64 uses: actions/upload-artifact@v2.2.2 with: diff --git a/.github/workflows/godot-build-release.yml b/.github/workflows/godot-build-release.yml index 718fba89b..1afdf7540 100644 --- a/.github/workflows/godot-build-release.yml +++ b/.github/workflows/godot-build-release.yml @@ -29,37 +29,10 @@ jobs: run: | echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Download Godot and export templates + - name: Build everything run: | - sudo apt install unzip - sudo apt install tree - echo *** Downloading Godot Binary *** - wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_linux_headless.64.zip - echo *** Downloading Godot Server Export Templates *** - wget https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_export_templates.tpz - echo *** Unzipping Godot Binary *** - unzip Godot_v3.2.4-rc3_linux_headless.64.zip - echo *** Unzipping Godot Server Export Templates *** - unzip Godot_v3.2.4-rc3_export_templates.tpz - echo *** Installing Godot Server Export Templates *** - cd /home/runner/ - mkdir -p .local/share/godot - cd .local/share/godot - sudo mkdir -p templates/3.2.4.rc3 - sudo cp -r $GITHUB_WORKSPACE/templates/* templates/3.2.4.rc3 - echo *** Exporting Files *** - cd $GITHUB_WORKSPACE - sudo mkdir -p builds/{x11-64-standard,win-64-standard,osx-standard} - - name: Export x11-64 - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "x11-64" $GITHUB_WORKSPACE/builds/x11-64-standard/FoxyAdventure.x86_64 - - name: Export osx - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "osx" $GITHUB_WORKSPACE/builds/osx-standard/FoxyAdventure.zip - - name: Export win-64 - run: | - sudo ./Godot_v3.2.4-rc3_linux_headless.64 --path "." --export "win-64" $GITHUB_WORKSPACE/builds/win-64-standard/FoxyAdventure.exe - tree -a + sudo chmod +x ./build_game.sh + ./build_game.sh - name: ZIP Builds run: | cd $GITHUB_WORKSPACE/builds/win-64-standard diff --git a/build_game.sh b/build_game.sh new file mode 100644 index 000000000..a36775005 --- /dev/null +++ b/build_game.sh @@ -0,0 +1,27 @@ +#!/bin/bash +sudo apt-get install unzip +GODOT_VERSION="3.2.4.rc3" +GODOT_BINARY_DOWNLOAD_LINK="https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_linux_headless.64.zip" +GODOT_EXPORT_TEMPLATES_DOWNLOAD_LINK="https://downloads.tuxfamily.org/godotengine/3.2.4/rc3/Godot_v3.2.4-rc3_export_templates.tpz" + +GODOT_BINARY_FILENAME="$(basename -s .zip $GODOT_BINARY_DOWNLOAD_LINK)" +GODOT_ZIP_FILENAME="$(basename $GODOT_BINARY_DOWNLOAD_LINK)" +GODOT_TPZ_FILENAME="$(basename $GODOT_EXPORT_TEMPLATES_DOWNLOAD_LINK)" +wget $GODOT_BINARY_DOWNLOAD_LINK +wget $GODOT_EXPORT_TEMPLATES_DOWNLOAD_LINK + +unzip $GODOT_ZIP_FILENAME +unzip $GODOT_TPZ_FILENAME + +cd /home/runner/ +sudo mkdir -p .local/share/godot +cd .local/share/godot +sudo mkdir -p templates/$GODOT_VERSION +sudo cp -r $GITHUB_WORKSPACE/templates/* templates/$GODOT_VERSION + +cd $GITHUB_WORKSPACE +sudo mkdir -p builds/{x11-64-standard,win-64-standard,osx-standard} + +sudo ./$GODOT_BINARY_FILENAME --path "." --export "x11-64" $GITHUB_WORKSPACE/builds/x11-64-standard/FoxyAdventure.x86_64 +sudo ./$GODOT_BINARY_FILENAME --path "." --export "osx" $GITHUB_WORKSPACE/builds/osx-standard/FoxyAdventure.zip +sudo ./$GODOT_BINARY_FILENAME --path "." --export "win-64" $GITHUB_WORKSPACE/builds/win-64-standard/FoxyAdventure.exe