name: "Setup" description: "Setup the environment for building" inputs: ref: description: Which ref to build required: true runs: using: "composite" steps: - name: Check if clean id: clean run: | if [[ -d godot ]]; then echo "clean=false" >> $GITHUB_OUTPUT; else echo "clean=true" >> $GITHUB_OUTPUT; fi shell: bash - uses: actions/checkout@v3 if: steps.clean.outputs.clean == 'true' with: repository: godotengine/godot ref: ${{ inputs.ref }} path: "godot" - uses: actions/checkout@v3 if: steps.clean.outputs.clean == 'true' with: path: "repo" - name: Setup Python if: steps.clean.outputs.clean == 'true' uses: actions/setup-python@v4 with: python-version: 3.9 - name: Apply patches to godot if: steps.clean.outputs.clean == 'true' run: | # Patch godot (cd repo && mv "${{ env.modules }}" ../godot/custom.py && mv patches ../godot) cd godot for patch in patches/*; do git apply --ignore-whitespace "$patch" || err="$patch"; done if [[ -n $err ]]; then echo "::error file={${err}}::Go update your patch" exit 1 fi shell: bash