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
name: Setup
description: Setup godot and repo

runs:
  using: "composite"
  steps:
    - name: Check if clean
      id: clean
      run: |
        if [[ -z $(find . -mindepth 1 -maxdepth 1) ]]; then
          echo "::set-output name=clean::true" && echo "clean" 
        else
          echo "::set-output name=clean::false" && echo "dirty"
        fi
      shell: bash

    - name: Checkout
      if: steps.clean.outputs.clean == 'true'
      uses: actions/checkout@v3
      with:
        lfs: true
        submodules: recursive
    - name: Setup
      run: |
        echo "::group::Setup godot"
        git config --global --add safe.directory $(pwd)
        git rev-parse --short HEAD > version || true
        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