mirror of
https://github.com/RaindropViewer/RaindropViewer.git
synced 2026-07-27 22:11:39 +00:00
65 lines
1.8 KiB
YAML
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
|