Skip to content

Commit

Permalink
make godot-version required and add godot-channel
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Aug 12, 2024
1 parent d7d8a3e commit 306a550
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 13 additions & 10 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 306a550

Please sign in to comment.