Merge pull request #44 from OTK-LAB/feature/Menus #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GameCI Template 🎮 | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
testRunner: | |
name: Test in ${{ matrix.testMode }} ✨ | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
projectPath: | |
- test-project | |
testMode: | |
- EditMode | |
- PlayMode | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
lfs: true | |
- name: Restore cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ matrix.projectPath }}/Library | |
key: Library-${{ matrix.projectPath }} | |
restore-keys: | | |
Library- | |
- name: Run tests | |
uses: game-ci/unity-test-runner@v2 | |
id: testRunner | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
testMode: ${{ matrix.testMode }} | |
checkName: ${{ matrix.testMode }} test results | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: Test results for ${{ matrix.testMode }} | |
path: ${{ steps.testRunner.outputs.artifactsPath }} | |
builder: | |
needs: testRunner | |
name: Build for ${{ matrix.targetPlatform }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
targetPlatform: | |
- StandaloneWindows64 # Build a Windows 64-bit standalone. | |
- WebGL # WebGL. | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/cache@v2 | |
with: | |
path: Library | |
key: Library-${{ matrix.targetPlatform }} | |
restore-keys: Library- | |
- uses: game-ci/unity-builder@v2 | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
with: | |
targetPlatform: ${{ matrix.targetPlatform }} | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Build-${{ matrix.targetPlatform }} | |
path: build/${{ matrix.targetPlatform }} | |
deployPages: | |
needs: builder | |
name: Deploy to Github Pages 🚀 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: Build-WebGL | |
path: build | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build/WebGL |