Skip to content

nightly v1.8.0.0 (12/20) #142

nightly v1.8.0.0 (12/20)

nightly v1.8.0.0 (12/20) #142

Workflow file for this run

name: Unity Actions
on:
pull_request: {}
push: {}
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
PROJECT_PATH: .
jobs:
checklicense:
name: check if UNITY_LICENSE is set in github secrets
runs-on: ubuntu-latest
outputs:
is_unity_license_set: ${{ steps.checklicense_job.outputs.is_unity_license_set }}
steps:
- name: Check wheter unity activation requests should be done
id: checklicense_job
run: |
echo "Skip activation job: ${{ env.UNITY_LICENSE != '' }}"
echo "is_unity_license_set=${{ env.UNITY_LICENSE != '' }}" >> $GITHUB_OUTPUT
activation:
needs: [checklicense]
if: needs.checklicense.outputs.is_unity_license_set == 'false'
name: Request manual activation file
runs-on: ubuntu-latest
steps:
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
- name: Expose as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
build:
needs: [checklicense]
if: needs.checklicense.outputs.is_unity_license_set == 'true'
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneLinux64
- StandaloneWindows64
- StandaloneWindows
- StandaloneOSX
- WebGL
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ${{ env.PROJECT_PATH }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
- uses: game-ci/unity-builder@v2
with:
buildMethod: BuildScript.GABuild
projectPath: ${{ env.PROJECT_PATH }}
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build