tools for exporting godot projects via Github Actions
containerless?
| -rw-r--r-- | .github/actions/export-android/action.yml | 18 | ||||
| -rw-r--r-- | .github/actions/setup-godot/action.yml | 13 |
2 files changed, 26 insertions, 5 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml index 40b7276..2b8c8c1 100644 --- a/.github/actions/export-android/action.yml +++ b/.github/actions/export-android/action.yml @@ -13,13 +13,25 @@ inputs: runs: using: composite steps: - - name: Setup + - name: Setup godot uses: bend-n/godot-actions/.github/actions/setup-godot@main + - name: Setup android sdk + run: | + sudo apt-get update && sudo apt-get install -y adb openjdk-11-jdk-headless ca-certificates python python-openssl + export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 + export ANDROID_HOME="/usr/lib/android-sdk" + wget -nv https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip -O tools.zip + sudo mkdir -pv "$ANDROID_HOME" + sudo unzip tools.zip -d "$ANDROID_HOME/cmdline-tools" && rm tools.zip + PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}" + yes | sdkmanager --licenses >/dev/null + sudo sdkmanager "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529" + + shell: bash + - name: Setup editor settings - # the Dockerfile is supposed to do this for me *grumbles* run: | - apt-get update && apt-get install -y curl mkdir -vp ~/.config/godot curl 'https://raw.githubusercontent.com/bend-n/godot-actions/main/.github/editor-settings.tres' --output ~/.config/godot/editor_settings-3.tres diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml index 6bbad50..6df327c 100644 --- a/.github/actions/setup-godot/action.yml +++ b/.github/actions/setup-godot/action.yml @@ -11,6 +11,15 @@ runs: submodules: recursive - name: Setup run: | - mkdir -v -p ~/.local/share/godot/templates - mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + BASE_URL="https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}" + HEADLESS="$BASE_URL/Godot_v${GODOT_VERSION}-${RELEASE}_linux_headless.64.zip" + TEMPLATES="$BASE_URL/Godot_v${GODOT_VERSION}-${RELEASE}_export_templates.tpz" + wget -nv "$HEADLESS" -O godot.zip + wget -nv "$TEMPLATES" -O templates.zip + mkdir ~/.cache && mkdir -p ~/.config/godot && mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE} + unzip godot.zip && mv "Godot_v${GODOT_VERSION}-${RELEASE}_linux_headless.64" /usr/local/bin/godot + unzip templates.zip && mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE} + rm godot.zip templates.zip + + godot -e -q shell: bash |