tools for exporting godot projects via Github Actions
bendn 2022-07-27
parent 01e37fd · commit 679f956
-rw-r--r--.github/actions/export-android/action.yml1
-rw-r--r--.github/actions/itch-push/action.yml9
2 files changed, 5 insertions, 5 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml
index cc90be3..9337fc4 100644
--- a/.github/actions/export-android/action.yml
+++ b/.github/actions/export-android/action.yml
@@ -45,7 +45,6 @@ runs:
password="${{ inputs.android-password }}"
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"
diff --git a/.github/actions/itch-push/action.yml b/.github/actions/itch-push/action.yml
index b8a1d89..8d5214f 100644
--- a/.github/actions/itch-push/action.yml
+++ b/.github/actions/itch-push/action.yml
@@ -24,14 +24,15 @@ runs:
[[ -z $ITCH_PATH ]] && ITCH_PATH=bendn/$NAME
function push() {
channel=$1
+ [[ ! -d $channel ]] && exit 0
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"
+ chmod +x **;
+ butler push "$channel" "$ITCH_PATH:$channel"
echo "::endgroup::"
}
- push "web"; push "linux"; push "windows"; unzip "mac/$NAME.zip" -d mac/ && rm "mac/$NAME.zip" && push "mac"
+ push "web"; push "linux"; push "windows";
+ [[ -d mac ]] && unzip "mac/$NAME.zip" -d mac/ && rm "mac/$NAME.zip" && push "mac"
[[ -d android ]] && rm android/*.idsig && push "android"
env:
BUTLER_API_KEY: ${{ inputs.api-key }}