tools for exporting godot projects via Github Actions
Diffstat (limited to '.github/actions/itch-push/action.yml')
-rw-r--r--.github/actions/itch-push/action.yml16
1 files changed, 8 insertions, 8 deletions
diff --git a/.github/actions/itch-push/action.yml b/.github/actions/itch-push/action.yml
index 18f2346..4b84f0e 100644
--- a/.github/actions/itch-push/action.yml
+++ b/.github/actions/itch-push/action.yml
@@ -8,6 +8,7 @@ inputs:
itch-path:
description: "The path to the itch.io project eg: leafo/x-moon"
required: false
+ default: ""
runs:
using: composite
@@ -20,18 +21,17 @@ runs:
- name: Push
run: |
+ [[ -z $ITCH_PATH ]] && ITCH_PATH=bendn/$NAME
function push() {
channel=$1
- [[ ! -d $channel ]] && return 0
- echo "::group::Push $channel"
- chmod +x "$channel/"*;
- butler push "$channel" "${{ inputs.itch-path }}:$channel"
- echo "::endgroup::"
+ [[ $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"
}
- push "web"; push "linux"; push "windows";
- [[ -d mac ]] && echo -e '#!/bin/bash\ncd "$(dirname "$0")";\nxattr -cr "$(pwd)/${{ env.NAME }}.app";\nopen -n -a "$(pwd)/${{ env.NAME }}.app"' >./mac/run.sh \
- && push "mac"
+ 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"
env:
BUTLER_API_KEY: ${{ inputs.api-key }}
+ ITCH_PATH: ${{ inputs.itch-path }}
shell: bash