diff --git a/.github/actions/import/action.yml b/.github/actions/import/action.yml new file mode 100644 index 0000000..20fd5f0 --- /dev/null +++ b/.github/actions/import/action.yml @@ -0,0 +1,21 @@ +name: Import +description: Import +inputs: + path: + description: Path + required: true + +runs: + using: composite + steps: + - name: Prep + shell: bash + run: | + cd imgui-godot-* + cd imgui-godot-* + cd ${{ inputs.path }} + godotenv addons install + mkdir .godot + echo "res://addons/imgui-godot/imgui-godot-native.gdextension" > .godot/extension_list.cfg + $GODOT --headless --import || true + echo "GAMEDIR=$(pwd)" >> $GITHUB_ENV diff --git a/.github/workflows/gdext.yml b/.github/workflows/gdext.yml index ea0bb2b..e971b34 100644 --- a/.github/workflows/gdext.yml +++ b/.github/workflows/gdext.yml @@ -291,6 +291,8 @@ jobs: gdver: ["4.2.2", "4.3.0-beta.2"] steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: pattern: imgui-godot-*_imgui* @@ -300,19 +302,13 @@ jobs: with: version: ${{ matrix.gdver }} - - name: Prep - run: | - cd imgui-godot-* - cd imgui-godot-* - ls -R - cd doc/examples/GdsGameProject - mkdir ../export - godotenv addons install - timeout 10 $GODOT --headless --import || true - $GODOT --headless --import - echo "GAMEDIR=$(pwd)" >> $GITHUB_ENV + - name: Import + uses: ./.github/actions/import + with: + path: doc/examples/GdsGameProject - name: Export Debug + shell: bash run: | cd $GAMEDIR $GODOT --headless --export-debug $RUNNER_OS @@ -321,6 +317,7 @@ jobs: rm -rf * - name: Export Release + shell: bash run: | cd $GAMEDIR $GODOT --headless --export-release $RUNNER_OS @@ -359,17 +356,10 @@ jobs: with: version: ${{ matrix.gdver }} - - name: Prep - shell: bash - run: | - cd imgui-godot-* - cd imgui-godot-* - cd doc/test - godotenv addons install - mkdir .godot - echo "res://addons/imgui-godot/imgui-godot-native.gdextension" > .godot/extension_list.cfg - $GODOT --headless --import || true - echo "GAMEDIR=$(pwd)" >> $GITHUB_ENV + - name: Import + uses: ./.github/actions/import + with: + path: doc/test - name: Run tests shell: bash