Skip to content

Commit

Permalink
Added basic CI/CD infrastructure.
Browse files Browse the repository at this point in the history
  • Loading branch information
PathogenDavid committed Sep 14, 2024
1 parent 98aafa4 commit 54b5d1b
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build
on:
push:
branches: ['main']
pull_request:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
# ----------------------------------------------------------------------- Checkout
- name: Checkout
uses: actions/checkout@v4

# ----------------------------------------------------------------------- Restore library cache
- name: Restore library cache
uses: actions/cache@v3
with:
path: Library
key: Library-${{hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**')}}
restore-keys: |
Library-
# ----------------------------------------------------------------------- Build
- name: Build
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{secrets.UNITY_LICENSE}}
UNITY_EMAIL: ${{secrets.UNITY_EMAIL}}
UNITY_PASSWORD: ${{secrets.UNITY_PASSWORD}}
with:
targetPlatform: WebGL
buildsPath: Build

# ----------------------------------------------------------------------- Collect artifacts
- name: Collect build
uses: actions/upload-artifact@v4
with:
name: Build-WebGL
if-no-files-found: error
path: Build

- name: Collect GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
path: Build

# ----------------------------------------------------------------------- Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

0 comments on commit 54b5d1b

Please sign in to comment.