put the godot installation right in the main action file
This commit is contained in:
39
action.yml
39
action.yml
@@ -18,6 +18,10 @@ inputs:
|
||||
description: "The project directory in which the action is to be executed. The specified directory must end with a path separator. e.g. ./MyProject/"
|
||||
required: false
|
||||
default: "./"
|
||||
install-path:
|
||||
description: "Install path of the Godot executable"
|
||||
required: false
|
||||
default: "/home/runner/godot-linux"
|
||||
|
||||
outputs:
|
||||
godot_bin:
|
||||
@@ -41,14 +45,35 @@ runs:
|
||||
restore-keys: ${{ env.CACHE_NAME }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: "Install Godot ${{ inputs.godot-version }}"
|
||||
- name: "Download and Install Godot ${{ inputs.godot-version }}-${{ inputs.godot-status }}"
|
||||
if: steps.godot-cache-binary.outputs.cache-hit != 'true'
|
||||
uses: ./.gdunit4_action/godot-install
|
||||
with:
|
||||
godot-version: ${{ inputs.godot-version }}
|
||||
godot-net: true
|
||||
godot-status-version: ${{ inputs.godot-status }}
|
||||
install-path: "/home/runner/godot-linux"
|
||||
continue-on-error: false
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ${{ inputs.install-path }}
|
||||
chmod 770 ${{ inputs.install-path }}
|
||||
DIR="$HOME/.config/godot"
|
||||
if [ ! -d "$DIR" ]; then
|
||||
mkdir -p "$DIR"
|
||||
chmod 770 "$DIR"
|
||||
fi
|
||||
|
||||
DOWNLOAD_URL=https://github.com/godotengine/godot-builds/releases/download/${{ inputs.godot-version }}-${{ inputs.godot-status }}
|
||||
GODOT_BIN=Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status }}_mono_linux_x86_64
|
||||
|
||||
GODOT_PACKAGE=$GODOT_BIN.zip
|
||||
echo "Download URL: $DOWNLOAD_URL/$GODOT_PACKAGE"
|
||||
wget --progress=bar:force:noscroll $DOWNLOAD_URL/$GODOT_PACKAGE -P ${{ inputs.install-path }}
|
||||
unzip ${{ inputs.install-path }}/$GODOT_PACKAGE -d ${{ inputs.install-path }}
|
||||
rm -rf ${{ inputs.install-path }}/$GODOT_PACKAGE
|
||||
|
||||
echo "Run linux part"
|
||||
mv ${{ inputs.install-path }}/$GODOT_BIN/* ${{ inputs.install-path }}
|
||||
rmdir ${{ inputs.install-path }}/$GODOT_BIN/
|
||||
|
||||
mv ${{ inputs.install-path }}/Godot_v* ${{ inputs.install-path }}/godot
|
||||
chmod u+x ${{ inputs.install-path }}/godot
|
||||
echo "${{ inputs.install-path }}/godot"
|
||||
|
||||
- name: "print restored version - ${{ inputs.godot-version }}"
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user