format action
This commit is contained in:
48
action.yml
48
action.yml
@@ -1,69 +1,61 @@
|
||||
name: 'Setup Godot'
|
||||
description: 'This GitHub Action automates the setup of Godot'
|
||||
name: "Setup Godot"
|
||||
description: "This GitHub Action automates the setup of Godot"
|
||||
author: Mike Schulze <mikeschulze.lpz@gmail.com>
|
||||
|
||||
inputs:
|
||||
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
|
||||
godot-status:
|
||||
description: 'The Godot status (e.g., "stable", "rc1", "dev1")'
|
||||
required: false
|
||||
default: 'stable'
|
||||
default: "stable"
|
||||
dotnet-version:
|
||||
description: 'The used .NET version to run the test (e.g. "net7.0", "net8.0")'
|
||||
required: false
|
||||
default: net8.0
|
||||
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
|
||||
default: './'
|
||||
default: "./"
|
||||
|
||||
outputs:
|
||||
godot_bin:
|
||||
description: 'The location of the godot executable'
|
||||
description: "The location of the godot executable"
|
||||
value: /home/runner/godot-linux/godot
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
using: "composite"
|
||||
steps:
|
||||
# Verify version compatibility
|
||||
- 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'
|
||||
- name: "Set Cache Name"
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
id: godot-cache-binary
|
||||
with:
|
||||
path: '/home/runner/godot-linux'
|
||||
path: "/home/runner/godot-linux"
|
||||
key: ${{ env.CACHE_NAME }}
|
||||
restore-keys: ${{ env.CACHE_NAME }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: 'Install Godot ${{ inputs.godot-version }}'
|
||||
- name: "Install Godot ${{ inputs.godot-version }}"
|
||||
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'
|
||||
install-path: "/home/runner/godot-linux"
|
||||
|
||||
- name: 'print restored version - ${{ inputs.godot-version }}'
|
||||
- name: "print restored version - ${{ inputs.godot-version }}"
|
||||
shell: bash
|
||||
run: |
|
||||
/home/runner/godot-linux/godot --version
|
||||
|
||||
- name: 'Set .NET SDK version'
|
||||
- name: "Set .NET SDK version"
|
||||
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -71,13 +63,13 @@ runs:
|
||||
echo "SDK_VERSION=$sdk_version" >> "$GITHUB_ENV"
|
||||
echo "Using .NET version: '$sdk_version'"
|
||||
|
||||
- name: 'Setup .NET SDK'
|
||||
- name: "Setup .NET SDK"
|
||||
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
|
||||
uses: actions/setup-dotnet@v5
|
||||
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() }}
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -87,10 +79,10 @@ runs:
|
||||
dotnet build
|
||||
dotnet list package
|
||||
|
||||
- name: 'Restore Godot project cache'
|
||||
- name: "Restore Godot project cache"
|
||||
if: ${{ steps.version_check.outcome == 'success' && !cancelled() }}
|
||||
env:
|
||||
GODOT_BIN: '/home/runner/godot-linux/godot'
|
||||
GODOT_BIN: "/home/runner/godot-linux/godot"
|
||||
shell: bash
|
||||
run: |
|
||||
cd "${{ inputs.project_dir }}"
|
||||
|
||||
Reference in New Issue
Block a user