This is based on https://github.com/marketplace/actions/setup-unity All credit goes to the original author
GitHub Action to download and install Unity. Based on Unity Hub.
Works on Ubuntu, macOS and Windows.
Unity version to install. For example, 2019.4.9f1
. Project version will be used if not provided.
Unity version changeset. For example, 50fe8a171dd9
. Automatically parsed from Unity site if not provided.
List of Unity modules (e.g. build support) to install. For example, [ios, android, webgl]
.
Available modules can be found in the test workflows (test-ubuntu, test-macos, test-windows).
Also list of available modules can be found by execute <unity-hub> -- --headless help
but result may contains wrong names.
Automatically installs all child modules of selected modules. For example, android-open-jdk
and android-sdk-ndk-tools
for android. Default true
.
Path to Unity project. Used to find Unity version. Default ${{ github.workspace }}
.
Path where the Unity editor will be installed.
Unity version.
Unity executable path. Also set as an environment variable UNITY_PATH
.
- Installing
android
module with childs modules may freeze on macOS. Recommended to use withtimeout-minutes
. - Workflow may fail with
System.IO.IOException: No space left on device
on GitHub-hosted Ubuntu. Settinginstall-path: /mnt
can fix the problem.
- name: Checkout project
uses: actions/checkout@v2
- name: Setup Unity
uses: kuler90/setup-unity@v1
with:
unity-modules: android
- name: Activate Unity
uses: kuler90/activate-unity@v1
with:
unity-username: ${{ secrets.UNITY_USERNAME }}
unity-password: ${{ secrets.UNITY_PASSWORD }}
unity-authenticator-key: ${{ secrets.UNITY_AUTHENTICATOR_KEY }}
- name: Build Unity
uses: kuler90/build-unity@v1
with:
build-target: Android
build-path: ./build.apk