Compare commits

...

2 Commits

View File

@@ -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/" 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 required: false
default: "./" default: "./"
install-path:
description: "Install path of the Godot executable"
required: false
default: "/home/runner/godot-linux"
outputs: outputs:
godot_bin: godot_bin:
@@ -36,24 +40,45 @@ runs:
uses: actions/cache@v5 uses: actions/cache@v5
id: godot-cache-binary id: godot-cache-binary
with: with:
path: "/home/runner/godot-linux" path: ${{ inputs.install-path }}
key: ${{ env.CACHE_NAME }} key: ${{ env.CACHE_NAME }}
restore-keys: ${{ env.CACHE_NAME }} restore-keys: ${{ env.CACHE_NAME }}
enableCrossOsArchive: true 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' if: steps.godot-cache-binary.outputs.cache-hit != 'true'
uses: ./.gdunit4_action/godot-install continue-on-error: false
with: shell: bash
godot-version: ${{ inputs.godot-version }} run: |
godot-net: true mkdir -p ${{ inputs.install-path }}
godot-status-version: ${{ inputs.godot-status }} chmod 770 ${{ inputs.install-path }}
install-path: "/home/runner/godot-linux" 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 }}" - name: "print restored version - ${{ inputs.godot-version }}"
shell: bash shell: bash
run: | run: |
/home/runner/godot-linux/godot --version ${{ inputs.install-path }}/godot --version
- name: "Set .NET SDK version" - name: "Set .NET SDK version"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
@@ -82,7 +107,7 @@ runs:
- name: "Restore Godot project cache" - name: "Restore Godot project cache"
if: ${{ !cancelled() }} if: ${{ !cancelled() }}
env: env:
GODOT_BIN: "/home/runner/godot-linux/godot" GODOT_BIN: "${{ inputs.install-path }}/godot"
shell: bash shell: bash
run: | run: |
cd "${{ inputs.project_dir }}" cd "${{ inputs.project_dir }}"