format action

This commit is contained in:
2026-01-28 16:27:03 +01:00
parent 1895211233
commit 90a0577962

View File

@@ -1,69 +1,61 @@
name: 'Setup Godot' name: "Setup Godot"
description: 'This GitHub Action automates the setup of Godot' description: "This GitHub Action automates the setup of Godot"
author: Mike Schulze <mikeschulze.lpz@gmail.com> author: Mike Schulze <mikeschulze.lpz@gmail.com>
inputs: inputs:
godot-version: godot-version:
description: 'The version of Godot in which the tests should be run.' description: "The version of Godot in which the tests should be run."
required: true required: true
godot-status: godot-status:
description: 'The Godot status (e.g., "stable", "rc1", "dev1")' description: 'The Godot status (e.g., "stable", "rc1", "dev1")'
required: false required: false
default: 'stable' default: "stable"
dotnet-version: dotnet-version:
description: 'The used .NET version to run the test (e.g. "net7.0", "net8.0")' description: 'The used .NET version to run the test (e.g. "net7.0", "net8.0")'
required: false required: false
default: net8.0 default: net8.0
project_dir: project_dir:
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: "./"
outputs: outputs:
godot_bin: godot_bin:
description: 'The location of the godot executable' description: "The location of the godot executable"
value: /home/runner/godot-linux/godot value: /home/runner/godot-linux/godot
runs: runs:
using: 'composite' using: "composite"
steps: steps:
# Verify version compatibility - name: "Set Cache Name"
- name: 'Check Version Compatibility'
uses: ./.gdunit4_action/versioning/check
id: version_check
with:
godot-version: ${{ inputs.godot-version }}
gdunit-version: ${{ env.GDUNIT_VERSION }}
- name: 'Set Cache Name'
shell: bash shell: bash
run: | run: |
echo "CACHE_NAME=${{ runner.OS }}-Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status }}-${{ inputs.dotnet-version }}" >> "$GITHUB_ENV" echo "CACHE_NAME=${{ runner.OS }}-Godot_v${{ inputs.godot-version }}-${{ inputs.godot-status }}-${{ inputs.dotnet-version }}" >> "$GITHUB_ENV"
- name: 'Build Cache' - name: "Build Cache"
uses: actions/cache@v5 uses: actions/cache@v5
id: godot-cache-binary id: godot-cache-binary
with: with:
path: '/home/runner/godot-linux' path: "/home/runner/godot-linux"
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: "Install Godot ${{ inputs.godot-version }}"
if: steps.godot-cache-binary.outputs.cache-hit != 'true' if: steps.godot-cache-binary.outputs.cache-hit != 'true'
uses: ./.gdunit4_action/godot-install uses: ./.gdunit4_action/godot-install
with: with:
godot-version: ${{ inputs.godot-version }} godot-version: ${{ inputs.godot-version }}
godot-net: true godot-net: true
godot-status-version: ${{ inputs.godot-status }} godot-status-version: ${{ inputs.godot-status }}
install-path: '/home/runner/godot-linux' install-path: "/home/runner/godot-linux"
- 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 /home/runner/godot-linux/godot --version
- name: 'Set .NET SDK version' - name: "Set .NET SDK version"
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }} if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
shell: bash shell: bash
run: | run: |
@@ -71,13 +63,13 @@ runs:
echo "SDK_VERSION=$sdk_version" >> "$GITHUB_ENV" echo "SDK_VERSION=$sdk_version" >> "$GITHUB_ENV"
echo "Using .NET version: '$sdk_version'" echo "Using .NET version: '$sdk_version'"
- name: 'Setup .NET SDK' - name: "Setup .NET SDK"
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }} if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
uses: actions/setup-dotnet@v5 uses: actions/setup-dotnet@v5
with: with:
dotnet-version: '${{ env.SDK_VERSION }}' dotnet-version: "${{ env.SDK_VERSION }}"
- name: 'Restore .Net Project' - name: "Restore .Net Project"
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }} if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
shell: bash shell: bash
run: | run: |
@@ -87,10 +79,10 @@ runs:
dotnet build dotnet build
dotnet list package dotnet list package
- name: 'Restore Godot project cache' - name: "Restore Godot project cache"
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }} if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
env: env:
GODOT_BIN: '/home/runner/godot-linux/godot' GODOT_BIN: "/home/runner/godot-linux/godot"
shell: bash shell: bash
run: | run: |
cd "${{ inputs.project_dir }}" cd "${{ inputs.project_dir }}"