Files
RaindropViewer/.github/workflows/main.yml
T
Workflow config file is invalid. Please check your config file: model.ReadWorkflow: yaml: line 16: mapping values are not allowed in this context
2022-07-08 21:11:06 +08:00

65 lines
1.8 KiB
YAML

# Taking notes...
# https://github.com/modesttree/Zenject/blob/master/.github/workflows/main.yml
name: Test and build
on:
pull_request: {}
push: { branches: [main, develop] }
jobs:
buildAndTestForSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 2020.3.29f1
targetPlatform:
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- Android # Build a Android standalone.
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
- name: Restore Library cache
uses: actions/cache@v2
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: |
Library-
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ matrix.unityVersion }}
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
# Output
- uses: actions/upload-artifact@v2
with:
name: Build
path: build