tools for exporting godot projects via Github Actions
-rw-r--r--.github/actions/export-android/action.yml28
-rw-r--r--.github/actions/export-linux/action.yml4
-rw-r--r--.github/actions/export-mac/action.yml4
-rw-r--r--.github/actions/export-web/action.yml4
-rw-r--r--.github/actions/export-windows/action.yml4
-rw-r--r--.github/actions/itch-push/action.yml2
-rw-r--r--.github/actions/setup-godot/action.yml2
7 files changed, 27 insertions, 21 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml
index 1394c12..cc90be3 100644
--- a/.github/actions/export-android/action.yml
+++ b/.github/actions/export-android/action.yml
@@ -22,20 +22,20 @@ runs:
export ANDROID_HOME="/usr/lib/android-sdk"
export PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}"
if [[ ! -d ${ANDROID_HOME}/cmdline-tools ]]; then
- echo "::group::rar"
- mkdir -vp ${ANDROID_HOME}/cmdline-tools
+ echo "::group::Downloading Android SDKs"
+ mkdir -p ${ANDROID_HOME}/cmdline-tools
keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 && mv debug.keystore /root/debug.keystore
wget -nv https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip -O ~/tools.zip
- unzip -q ~/tools.zip -d ${ANDROID_HOME}/cmdline-tools && rm ~/tools.zip && echo "Finished unzipping"
+ unzip ~/tools.zip -d ${ANDROID_HOME}/cmdline-tools && rm ~/tools.zip && echo "Finished unzipping"
yes | sdkmanager --licenses > /dev/null && echo "Accepted licenses"
- sdkmanager "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529" > /dev/null && echo "Installed Android SDKs"
+ sdkmanager "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529" && echo "Installed Android SDKs"
echo "::endgroup::"
fi
shell: bash
- name: Setup editor settings
run: |
- mkdir -vp ~/.config/godot/
+ mkdir -p ~/.config/godot/
mv /root/.config/godot/editor_settings-3.tres ~/.config/godot/editor_settings-3.tres
shell: bash
@@ -43,30 +43,24 @@ runs:
if: ${{ inputs.android-keystore-base64 }}
run: |
password="${{ inputs.android-password }}"
- echo "Building in release mode"
+ echo "::group::Build android (release)"
echo "${{ inputs.android-keystore-base64 }}" | base64 --decode > ~/release.keystore && echo "Decoded keystore"
cat ~/release.keystore
alias=$(keytool -storepass "$password" -list -v -keystore ~/release.keystore | grep -E '^Alias name:\s*(.+)$' | cut -d ' ' -f 3-) && echo "Got alias name"
echo "Configuring with $alias, $password"
sed "s@keystore/release=\"\"@keystore/release=\"$HOME/release.keystore\"@g" -i export_presets.cfg && sed 's@keystore/release_user=".*"@keystore/release_user="'$alias'"@g' -i export_presets.cfg && sed 's@keystore/release_password=".*"@keystore/release_password="'$password'"@g' -i export_presets.cfg && echo "Configured export_presets.cfg"
- mkdir -vp build/android
+ mkdir -p build/android
godot -v --export "Android" ./build/android/$NAME.apk
- shell: bash
-
- - name: Debug (failure)
- if: ${{ failure() }}
- run: |
- cat export_presets.cfg
- echo '---------------------------'
- cat ~/.config/godot/editor_settings-3.tres
+ echo "::endgroup::"
shell: bash
- name: Build (debug)
if: ${{ inputs.android-keystore-base64 }} == ""
run: |
- echo "Building in debug mode"
- mkdir -vp build/android || true
+ echo "::group::Build android (debug)"
+ mkdir -p build/android || true
godot -v --export-debug "Android" ./build/android/$NAME.apk
+ echo "::endgroup::"
shell: bash
- name: Upload
diff --git a/.github/actions/export-linux/action.yml b/.github/actions/export-linux/action.yml
index be36a1b..cfb5dc2 100644
--- a/.github/actions/export-linux/action.yml
+++ b/.github/actions/export-linux/action.yml
@@ -7,10 +7,12 @@ runs:
- name: Setup
uses: bend-n/godot-actions/.github/actions/setup-godot@main
- - name: Build
+ - name: Linux Build
run: |
+ echo "::group::Linux Build"
mkdir -vp build/linux
godot -v --export "Linux" ./build/linux/$NAME.x86_64
+ echo "::endgroup::"
shell: bash
- uses: actions/upload-artifact@v1
diff --git a/.github/actions/export-mac/action.yml b/.github/actions/export-mac/action.yml
index fa88643..1513a86 100644
--- a/.github/actions/export-mac/action.yml
+++ b/.github/actions/export-mac/action.yml
@@ -7,10 +7,12 @@ runs:
- name: Setup
uses: bend-n/godot-actions/.github/actions/setup-godot@main
- - name: Build
+ - name: Mac Build
run: |
+ echo "::group::Mac Build"
mkdir -vp build/mac
godot -v --export "Mac" ./build/mac/$NAME.zip
+ echo "::endgroup::"
shell: bash
- name: Upload
diff --git a/.github/actions/export-web/action.yml b/.github/actions/export-web/action.yml
index 74111d5..ecf955c 100644
--- a/.github/actions/export-web/action.yml
+++ b/.github/actions/export-web/action.yml
@@ -17,10 +17,12 @@ runs:
- name: Setup
uses: bend-n/godot-actions/.github/actions/setup-godot@main
- - name: Build
+ - name: Web Build
run: |
+ echo "::group::Web Build"
mkdir -vp build/web
godot -v --export "HTML" ./build/web/index.html
+ echo "::endgroup::"
shell: bash
- name: Upload
diff --git a/.github/actions/export-windows/action.yml b/.github/actions/export-windows/action.yml
index c5e0cf3..c12d77a 100644
--- a/.github/actions/export-windows/action.yml
+++ b/.github/actions/export-windows/action.yml
@@ -9,8 +9,10 @@ runs:
- name: Windows Build
run: |
- mkdir -vp build/windows
+ echo "::group::Windows Build"
+ mkdir -p build/windows
godot -v --export "Windows" ./build/windows/$NAME.exe
+ echo "::endgroup::"
shell: bash
- name: Upload
diff --git a/.github/actions/itch-push/action.yml b/.github/actions/itch-push/action.yml
index 4b84f0e..b8a1d89 100644
--- a/.github/actions/itch-push/action.yml
+++ b/.github/actions/itch-push/action.yml
@@ -24,10 +24,12 @@ runs:
[[ -z $ITCH_PATH ]] && ITCH_PATH=bendn/$NAME
function push() {
channel=$1
+ echo "::group::Push $channel"
[[ $channel == mac ]] && echo -e "#!/bin/bash\n"'cd "$(dirname "$0")"||exit;xattr -cr "$(pwd)/$NAME.app";open -n -a "$(pwd)/$NAME.app"' >./mac/run.sh
chmod +x **; to_push="$channel"
[[ $(find $channel -type f | wc -l) -eq 1 && $channel != "android" ]] && to_push="$(echo $(basename $channel/*) .7z | tr -d " ")" && (cd "$channel" && 7z a -mtm=off -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "../$to_push" ./*)
butler push "$to_push" "$ITCH_PATH:$channel"
+ echo "::endgroup::"
}
push "web"; push "linux"; push "windows"; unzip "mac/$NAME.zip" -d mac/ && rm "mac/$NAME.zip" && push "mac"
[[ -d android ]] && rm android/*.idsig && push "android"
diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml
index 9197a26..149ee51 100644
--- a/.github/actions/setup-godot/action.yml
+++ b/.github/actions/setup-godot/action.yml
@@ -11,10 +11,12 @@ runs:
submodules: recursive
- name: Setup
run: |
+ echo "::group::Setup godot"
git config --global --add safe.directory $(pwd)
git rev-parse --short HEAD > version
mkdir -v -p ~/.local/share/godot/templates
[[ -z $RELEASE ]] && RELEASE=stable
mv /root/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE} ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE}
ls ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE} | tr '\n' ' '
+ echo "::endgroup::"
shell: bash