name: Push to itch.io description: Push the created artifacts to itch.io inputs: api-key: description: The API key for the itch.io account required: true itch-path: description: "The path to the itch.io project eg: leafo/x-moon" required: false runs: using: composite steps: - name: Download uses: actions/download-artifact@v3 - name: Setup butler uses: jdno/setup-butler@v1 - name: Push run: | function push() { channel=$1 [[ ! -d $channel ]] && return 0 echo "::group::Push $channel" chmod +x "$channel/"*; butler push "$channel" "${{ inputs.itch-path }}:$channel" echo "::endgroup::" } 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" [[ -d android ]] && rm android/*.idsig && push "android" env: BUTLER_API_KEY: ${{ inputs.api-key }} shell: bash