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 }} runs: using: "composite" steps: - name: "Get Unity Build Target." id: getTarget run: | #Choose the correct buildTarget: https://docs.unity3d.com/Manual/EditorCommandLineArguments.html UNITY_PLATFORM=${{ inputs.platform }} UNITY_TARGET=$UNITY_PLATFORM if [[ $UNITY_PLATFORM == "windows" ]]; then UNITY_TARGET=Win64 elif [[ $UNITY_PLATFORM == "windows32bit" ]]; then UNITY_TARGET=Win elif [[ $UNITY_PLATFORM == "mac" ]]; then UNITY_TARGET=OSXUniversal elif [[ $UNITY_PLATFORM == "linux" ]]; then UNITY_TARGET=Linux64 elif [[ $UNITY_PLATFORM == "android" ]]; then UNITY_TARGET=Android fi echo "::set-output name=buildTarget::$UNITY_TARGET" shell: bash