unity-actions-example/.github/workflows/main.yml
2020-10-08 16:10:12 -04:00

55 lines
1.5 KiB
YAML

name: Actions 😎
on:
pull_request: {}
push: { branches: [main] }
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
jobs:
buildAndTestForSomePlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- .
unityVersion:
- 2020.1.7f1
targetPlatform:
- StandaloneOSX
- StandaloneWindows64
- StandaloneLinux64
steps:
- uses: actions/checkout@v2
with:
lfs: true
- uses: actions/cache@v1.1.0
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
# - uses: webbertakken/unity-test-runner@master
# id: testRunner
# with:
# projectPath: ${{ matrix.projectPath }}
# unityVersion: ${{ matrix.unityVersion }}
# - uses: actions/upload-artifact@v1
# with:
# name: Test results (all modes)
# path: ${{ steps.testRunner.outputs.artifactsPath }}
- uses: webbertakken/unity-builder@master
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: '-nographics'
- uses: actions/upload-artifact@v1
with:
name: Build
path: build