builds godot
tag support
| -rw-r--r-- | .github/actions/build-godot/action.yml | 2 | ||||
| -rw-r--r-- | .github/actions/get-version/action.yml | 8 | ||||
| -rw-r--r-- | .github/actions/setup/action.yml | 32 | ||||
| -rw-r--r-- | .github/workflows/build-3.x.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/manual-build.yml | 20 | ||||
| -rw-r--r-- | .github/workflows/reusable-build.yml | 4 |
6 files changed, 36 insertions, 32 deletions
diff --git a/.github/actions/build-godot/action.yml b/.github/actions/build-godot/action.yml index 5c14547..8c6d116 100644 --- a/.github/actions/build-godot/action.yml +++ b/.github/actions/build-godot/action.yml @@ -22,7 +22,7 @@ runs: - name: Setup uses: bend-n/godot-2d-builds/.github/actions/setup@main with: - branch: ${{ env.branch }} + ref: ${{ env.ref }} - name: Install linux dependencies if: ${{ inputs.platform }} == "x11" diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml index c29c6c2..601f484 100644 --- a/.github/actions/get-version/action.yml +++ b/.github/actions/get-version/action.yml @@ -1,5 +1,5 @@ -name: Get version of a branch -description: Get version of a branch from version.py +name: Get version +description: Get version of godot from version.py runs: using: "composite" @@ -7,12 +7,12 @@ runs: - name: Setup uses: bend-n/godot-2d-builds/.github/actions/setup@main with: - branch: ${{ env.branch }} + ref: ${{ env.ref }} - name: Setup Python uses: actions/setup-python@v2 - - name: Get version of branch + - name: Get version run: | cd godot echo 'print(f"{major}.{minor}")' >> version.py diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index e39331f..23f0be9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -2,20 +2,34 @@ name: "Setup" description: "Setup the environment for building" inputs: - url: - description: Godot git url - default: https://github.com/godotengine/godot + repo: + description: Godot github owner/repo + default: godotengine/godot required: true - branch: - description: Which branch to build + ref: + description: Which ref to build required: true runs: using: "composite" steps: - - name: Checkout + - name: Check if clean + id: clean run: | - [[ -d godot ]] && exit 0 # already checked out - git clone --depth 1 "${{ inputs.url }}" -b "${{ inputs.branch }}" godot - curl 'https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' --output godot/custom.py || wget -nv 'https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' -O godot/custom.py + if [[ -d godot ]]; then echo "::set-output name=clean::false"; + else echo "::set-output name=clean::true"; fi + shell: bash + + - uses: actions/checkout@v3 + if: steps.clean.outputs.clean == 'true' + with: + repository: ${{ inputs.repo }} + ref: ${{ inputs.ref }} + path: "godot" + + - name: Get module data + if: steps.clean.outputs.clean == 'true' + run: | + modules='https://raw.githubusercontent.com/bend-n/godot-2d-builds/main/.github/custom.py' + curl "$modules" --output godot/custom.py || wget -nv "$modules" -O godot/custom.py shell: bash diff --git a/.github/workflows/build-3.x.yml b/.github/workflows/build-3.x.yml index 2fdaf04..a223b49 100644 --- a/.github/workflows/build-3.x.yml +++ b/.github/workflows/build-3.x.yml @@ -12,5 +12,5 @@ jobs: name: Build 3.x uses: bend-n/godot-2d-builds/.github/workflows/reusable-build.yml@main with: - branch: 3.x + ref: 3.x secrets: inherit diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml index bd96fb2..8f04335 100644 --- a/.github/workflows/manual-build.yml +++ b/.github/workflows/manual-build.yml @@ -3,25 +3,15 @@ name: Manually build godot 2d on: workflow_dispatch: inputs: - branch: - type: choice - description: which branch to build + ref: + type: string + description: which ref to build required: true - options: - - "2.0" - - "2.1" - - "3.0" - - "3.1" - - "3.2" - - "3.3" - - "3.4" - - "3.5" - - "3.x" jobs: manual-build: - name: Build ${{ inputs.branch }} + name: Build ${{ inputs.ref }} uses: bend-n/godot-2d-builds/.github/workflows/reusable-build.yml@main with: - branch: ${{ inputs.branch }} + ref: ${{ inputs.ref }} secrets: inherit diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 2f9e5cb..318c3ef 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -3,7 +3,7 @@ name: Reusable build workflow on: workflow_call: inputs: - branch: + ref: required: true type: string flags: @@ -12,7 +12,7 @@ on: required: false env: - branch: ${{ inputs.branch }} + ref: ${{ inputs.ref }} flags: ${{ inputs.flags }} tools: no |