fix: project path workflow #10
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: Unity Build Workflow 🔨 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: {} | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Restore Library cache | |
uses: actions/cache@v4 | |
with: | |
path: PacoMonkey/Library | |
key: Library-${{ runner.os }}-${{ github.sha }} | |
restore-keys: | | |
Library-${{ runner.os }} | |
- name: Save Unity license to file | |
run: echo "${{ secrets.UNITY_LICENSE }}" > unity.ulf | |
- name: Activate Unity license | |
uses: game-ci/unity-activate@v2 | |
with: | |
activationFile: unity.ulf | |
- name: Run Unity tests | |
uses: game-ci/unity-test-runner@v2 | |
with: | |
projectPath: PacoMonkey | |
testMode: all | |
- name: Build project | |
uses: game-ci/unity-builder@v2 | |
with: | |
projectPath: PacoMonkey | |
targetPlatform: WebGL | |
- name: Upload build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WebGL Build | |
path: PacoMonkey/build/WebGL |