Updated unity actions.
This commit is contained in:
@@ -9,9 +9,8 @@ inputs:
|
||||
description: "Unity Platform. Options: windows, windows32bit, mac, linux, android"
|
||||
required: true
|
||||
serial:
|
||||
description: "Unity license serial number. Or 'personal' for a personal license."
|
||||
description: "Unity license serial number."
|
||||
required: true
|
||||
default: personal
|
||||
email:
|
||||
description: "Unity email."
|
||||
required: true
|
||||
@@ -21,39 +20,40 @@ inputs:
|
||||
command:
|
||||
description: "Unity command to run."
|
||||
required: false
|
||||
unityBuilder:
|
||||
description: "Whether or not to use the UnityBuilder instead of a Unity command."
|
||||
required: false
|
||||
noGraphics:
|
||||
description: "Whether or not to use the graphics device when running Unity."
|
||||
required: false
|
||||
default: "true"
|
||||
cacheVolume:
|
||||
description: "Name of the volume to cache the Library folder to."
|
||||
sshPublicKey:
|
||||
description: "Public SSH key to use for git package restoration."
|
||||
required: false
|
||||
removeContainer:
|
||||
description: "Remove the mock container after building."
|
||||
sshPrivateKey:
|
||||
description: "Private SSH key to use for git package restoration."
|
||||
required: false
|
||||
default: "false"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Replace spaces in project path."
|
||||
id: path
|
||||
run: |
|
||||
PROJECT_PATH=${{ inputs.projectPath }}
|
||||
PROJECT_PATH=${PROJECT_PATH// /\\ }
|
||||
echo "projectPath=$PROJECT_PATH" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
- name: "Get Unity Version."
|
||||
id: getVersion
|
||||
uses: act/unity/unity-get-version@master
|
||||
with:
|
||||
projectPath: ${{ inputs.projectPath }}
|
||||
projectPath: ${{ steps.path.outputs.projectPath }}
|
||||
- name: "Get Unity buildTarget."
|
||||
id: getTarget
|
||||
uses: act/unity/unity-get-buildtarget@master
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
- name: "Restore the cached Library folder."
|
||||
if: inputs.cacheVolume != null
|
||||
uses: act/common/docker/docker-cp@master
|
||||
- name: "Restore NugetForUnity packages if they exist."
|
||||
uses: act/dotnet/dotnet-nugetforunity-restore@master
|
||||
with:
|
||||
volume: ${{ inputs.cacheVolume }}
|
||||
toPath: .
|
||||
projectPath: ${{ steps.path.outputs.projectPath }}
|
||||
- name: "Run Unity command."
|
||||
uses: act/unity/unity-command@master
|
||||
with:
|
||||
@@ -62,13 +62,7 @@ runs:
|
||||
serial: ${{ inputs.serial }}
|
||||
email: ${{ inputs.email }}
|
||||
password: ${{ inputs.password }}
|
||||
command: -projectPath ${{ inputs.projectPath }} -buildTarget ${{ steps.getTarget.outputs.buildTarget }} ${{ inputs.command }}
|
||||
removeContainer: ${{ inputs.removeContainer }}
|
||||
sshPublicKey: ${{ inputs.sshPublicKey }}
|
||||
sshPrivateKey: ${{ inputs.sshPrivateKey }}
|
||||
noGraphics: ${{ inputs.noGraphics }}
|
||||
- name: "Cache the Library folder."
|
||||
if: inputs.cacheVolume != null
|
||||
uses: act/common/docker/docker-cp@master
|
||||
with:
|
||||
recreateVolume: true
|
||||
volume: ${{ inputs.cacheVolume }}
|
||||
fromPath: Library
|
||||
command: -projectPath ${{ steps.path.outputs.projectPath }} -buildTarget ${{ steps.getTarget.outputs.buildTarget }} ${{ inputs.command }}
|
||||
|
||||
Reference in New Issue
Block a user