Added many, many more actions.

This commit is contained in:
2025-06-24 15:24:16 -07:00
parent 62fbe4dead
commit 57ef232d2b
108 changed files with 4212 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
name: unity-get-buildtarget
description: "Get the correct Unity build target from a provided platform."
inputs:
platform:
description: "Unity Platform. Options: windows, windows32bit, mac, linux, android"
required: true
outputs:
buildTarget:
description: "Unity Build Target."
value: ${{ steps.getTarget.outputs.buildTarget }}
buildArg:
description: "Unity Build Argument."
value: ${{ steps.getTarget.outputs.buildArg }}
runs:
using: "composite"
steps:
- name: "Get Unity Build Target."
id: getTarget
run: |
#Choose the correct buildTarget: https://docs.unity3d.com/Manual/EditorCommandLineArguments.html
bash ${{ github.action_path }}/get_target.sh "${{ inputs.platform }}"
shell: bash

View File

@@ -0,0 +1,38 @@
#!/bin/bash
UNITY_TARGET="$1"
TARGET=$(echo "$UNITY_TARGET" | awk '{print tolower($0)}')
BUILD_ARG=""
case $TARGET in
"windows")
UNITY_TARGET=Win64
BUILD_ARG=-buildWindows64Player
;;
"windows32bit")
UNITY_TARGET=Win
BUILD_ARG=-buildWindowsPlayer
;;
"mac")
UNITY_TARGET=OSXUniversal
BUILD_ARG=-buildOSXUniversalPlayer
;;
"ios")
UNITY_TARGET=iOS
;;
"linux")
UNITY_TARGET=Linux64
BUILD_ARG=-buildLinux64Player
;;
"android")
UNITY_TARGET=Android
;;
"webgl")
UNITY_TARGET=WebGL
;;
*)
echo "Invalid target. Valid options are: Windows, Windows32bit, Mac, iOS, Linux, Android, WebGL"
;;
esac
echo "buildTarget=$UNITY_TARGET" >> "$GITHUB_OUTPUT"
echo "buildArg=$BUILD_ARG" >> "$GITHUB_OUTPUT"