Skip to content

Update Workflow

Update Workflow #65

Workflow file for this run

name: Actions 😎
on: [push, pull_request]
jobs:
build:
name: Build my project ✨
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
# Build
- name: Build project
uses: game-ci/unity-builder@v4
if: ${{ github.event_name == 'pull_request' || github.ref == 'refs/heads/main' && github.event_name == 'push' }}
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: WebGL
# Output
- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
with:
versioning: Semantic
name: Build
path: build