forked from PathogenDavid/HandmadeGame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98aafa4
commit c631bfb
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
# ----------------------------------------------------------------------- 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 | ||
|