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
name: "Get the export name for a platform"
description: "Get the export name for a platform, from the export_presets.cfg"

inputs:
  platform:
    description: "The platform to get the export name for"
    required: true

outputs:
  export-name:
    value: ${{ steps.get-export-name.outputs.export-name }}
    description: "The export name for the platform"

runs:
  using: "composite"
  steps:
    - name: Get export name
      id: get-export-name
      run: |
        cd "${{ env.PROJECT_PATH }}"
        wget -nv 'https://raw.githubusercontent.com/bend-n/godot-actions/main/.github/actions/get-export-name/get-export-name.py' -O get-export-name.py
        python get-export-name.py "${GODOT_VERSION:0:1}" "${{ inputs.platform }}" >/dev/null || (
          echo "::error file=${PROJECT_PATH}/export_presets.cfg,title=Missing Configuration::No export for ${{ inputs.platform }}."
          exit 1
        )
        echo "export-name=$(python get-export-name.py "${GODOT_VERSION:0:1}" "${{ inputs.platform }}")" >> "$GITHUB_OUTPUT"
      shell: bash