From 306a55061b42bae807cbd787ce0b6684275048be Mon Sep 17 00:00:00 2001 From: Simon Dalvai Date: Mon, 12 Aug 2024 13:17:17 +0200 Subject: [PATCH] make godot-version required and add godot-channel --- README.md | 9 +++++---- action.yml | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0a6185e..6f90207 100644 --- a/README.md +++ b/README.md @@ -30,17 +30,18 @@ You can find the code in the `main` branch. ## Parameters | key | required | default | description | | ----|----------|---------|-------------| +| godot-version | true | . | Godot Engine version. Supported are 4.x versions. Check versions [here](https://github.com/godotengine/godot-builds/releases) | +| godot-channel | false | stable | Godot Engine release channel (stable, beta, rc1, rc2, rc3...). Defaults to 'stable' Check release channels [here](https://github.com/godotengine/godot-builds/releases) | | working-directory | false | . | Path to project.godot file | -| godot-version | false | 4.x | Check versions [here](https://downloads.tuxfamily.org/godotengine/) | + ## How to use Use the 4.x tag ``` - name: Godot Android export - uses: dulvui/godot-android-export@v4.0.0 + uses: dulvui/godot-android-export@v4 with: - working-directory: game - godot-version: 4.2 + godot-version: 4.2.2 ``` ## Working examples diff --git a/action.yml b/action.yml index a540b18..7922120 100644 --- a/action.yml +++ b/action.yml @@ -12,9 +12,12 @@ inputs: required: false default: '.' godot-version: - description: 'Godot Engine version' + description: 'Godot Engine version. Supported are 4.x versions' + required: true + godot-channel: + description: 'Godot Engine release channel (stable, beta, rc1, rc2, rc3...). Defaults to stable' required: false - default: '4.2.2' + default: 'stable' runs: using: "composite" @@ -47,16 +50,16 @@ runs: shell: bash if: steps.cache-godot.outputs.cache-hit != 'true' run: | - wget -q https://github.com/godotengine/godot/releases/download/${{ inputs.godot-version }}-stable/Godot_v${{ inputs.godot-version }}-stable_linux.x86_64.zip - wget -q https://github.com/godotengine/godot/releases/download/${{ inputs.godot-version }}-stable/Godot_v${{ inputs.godot-version }}-stable_export_templates.tpz - unzip Godot_v${{ inputs.godot-version }}-stable_linux.x86_64.zip - unzip Godot_v${{ inputs.godot-version }}-stable_export_templates.tpz - mkdir -p ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.stable + wget -q https://github.com/godotengine/godot-builds/releases/download/${{ inputs.godot-version }}-${{ inputs.godot-channel}}/Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip + wget -q https://github.com/godotengine/godot-builds/releases/download/${{ inputs.godot-version }}-${{ inputs.godot-channel}}/Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz + unzip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip + unzip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz + mkdir -p ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel }} mkdir -p ~/.config/godot/ touch ~/.config/godot/editor_settings-4.tres - mv templates/* ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.stable - rm -f Godot_v${{ inputs.godot-version }}-stable_linux.x86_64.zip Godot_v${{ inputs.godot-version }}-stable_export_templates.tpz - mv ./Godot_v${{ inputs.godot-version }}-stable_linux.x86_64 /usr/local/bin/godot + mv templates/* ~/.local/share/godot/export_templates/${{ inputs.godot-version }}.${{ inputs.godot-channel }} + rm -f Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64.zip Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_export_templates.tpz + mv ./Godot_v${{ inputs.godot-version }}-${{ inputs.godot-channel }}_linux.x86_64 /usr/local/bin/godot - name: Set Android SDK path in Godot Editor settings if: steps.cache-godot.outputs.cache-hit != 'true'