mirror of
https://github.com/game-ci/unity-actions.git
synced 2026-01-29 04:39:07 +08:00
137 lines
3.8 KiB
YAML
137 lines
3.8 KiB
YAML
name: Actions 😎
|
|
on: [push]
|
|
|
|
jobs:
|
|
requestManualActivationFile:
|
|
name: Request manual activation file 🔑
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Request manual activation file
|
|
- name: Request manual activation file
|
|
uses: webbertakken/unity-request-manual-activation-file@v1
|
|
id: getManualLicenseFile
|
|
|
|
# Upload artifact (Unity_v20XX.X.XXXX.alf)
|
|
- name: Expose as artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
|
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
|
|
|
requestActivation:
|
|
name: Request activation ✔
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Activate Unity
|
|
- name: Unity - Activate
|
|
uses: webbertakken/unity-activate@v1
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
testRunnerInEditMode:
|
|
name: Test in editmode 📝
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository (required to test local actions)
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Configure test runner
|
|
- name: Run tests
|
|
id: testRunner
|
|
uses: webbertakken/unity-test-runner@v1
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_PROJECT_PATH: test-project
|
|
TEST_MODE: editmode
|
|
|
|
# Upload artifact
|
|
- name: Expose as artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Test results (edit mode)
|
|
path: ${{ steps.testRunner.outputs.artifactsPath }}
|
|
|
|
testRunnerInPlayMode:
|
|
name: Test in playmode 📺
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository (required to test local actions)
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Configure test runner
|
|
- name: Run tests
|
|
id: testRunner
|
|
uses: webbertakken/unity-test-runner@v1
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_PROJECT_PATH: test-project
|
|
TEST_MODE: playmode
|
|
|
|
# Upload artifact
|
|
- name: Expose as artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Test results (play mode)
|
|
path: ${{ steps.testRunner.outputs.artifactsPath }}
|
|
|
|
testRunnerInAllModes:
|
|
name: Test all modes ✨
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository (required to test local actions)
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Configure test runner
|
|
- name: Run tests
|
|
id: testRunner
|
|
uses: webbertakken/unity-test-runner@v1
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_PROJECT_PATH: test-project
|
|
TEST_MODE: all
|
|
|
|
# Upload artifacts
|
|
- name: Expose as artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Test results (all modes)
|
|
path: ${{ steps.testRunner.outputs.artifactsPath }}
|
|
|
|
buildForWebGL:
|
|
name: Build for WebGL 🕸
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout repository (required to test local actions)
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v1
|
|
|
|
# Configure builder
|
|
- name: Build project
|
|
id: buildStep
|
|
uses: webbertakken/unity-builder@v0.1
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_PROJECT_PATH: test-project
|
|
BUILD_NAME: TestBuild
|
|
BUILD_TARGET: WebGL
|
|
BUILDS_PATH: builds
|
|
BUILD_COMMAND: ""
|
|
|
|
# Upload distributables
|
|
- name: Upload Build
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: Build
|
|
path: ${{ steps.buildStep.outputs.allBuildsPath }}
|