tools for exporting godot projects via Github Actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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