Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Update To Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JackatDJL committed Oct 17, 2023
1 parent f861879 commit 72888c7
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 27 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Automatic CI
name: Automatic CI πŸ€–

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -59,5 +56,5 @@ jobs:
- name: Upload Artifact πŸ“¦
uses: actions/upload-artifact@v3
with:
name: Test results (${{ matrix.testMode }})
name: Test results (${{ matrix.testMode }}) πŸ“‘
path: ${{ steps.testRunner.outputs.artifactsPath }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Force Build 🚫
name: Build and Deploy Working Pre-Alpha πŸš€

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
Expand All @@ -7,8 +7,60 @@ on:
workflow_dispatch:

jobs:
testRunner:
name: Test in ${{ matrix.testMode }} ✨
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testMode:
- EditMode
- PlayMode
steps:
- name: Checkout code βœ…
uses: actions/checkout@v4

- name: Create LFS file list πŸ“œ
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id

- name: Restore LFS cache πŸ”„
uses: actions/cache@v3
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}

- name: Git LFS Pull πŸ“₯
run: |
git lfs pull
git add .
git reset --hard
- name: Restore Library cache πŸ”„
uses: actions/cache@v3
with:
path: Library
key: Library-test-project-${{ matrix.targetPlatform }}
restore-keys: |
Library-test-project-
Library-
- name: Run tests ⏯ πŸ“‘
uses: game-ci/[email protected]
id: testRunner
with:
testMode: ${{ matrix.testMode }}
checkName: ${{ matrix.testMode }} test results
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: ${{ vars.projectPath }}

- name: Upload Artifact πŸ“¦
uses: actions/upload-artifact@v3
with:
name: Test results (${{ matrix.testMode }}) πŸ“‘
path: ${{ steps.testRunner.outputs.artifactsPath }}

buildWGL:
name: Build for WebGL πŸ–₯️
needs: testRunner
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -53,8 +105,29 @@ jobs:
name: build-WebGL
path: build/WebGL

deployPages:
needs: buildWGL
name: Deploy to Github Pages πŸš€
runs-on: ubuntu-latest
steps:
- name: Checkout code βœ…
uses: actions/checkout@v4

- name: Download Artifact πŸ“¦
uses: actions/[email protected]
with:
name: build-WebGL
path: build/WebGL

- name: Deploy πŸš€
uses: JamesIves/[email protected]
with:
branch: main
folder: docs/WebGL

buildWindows:
name: Build for Windows πŸ–₯️
needs: testRunner
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -98,24 +171,3 @@ jobs:
with:
name: build-StandaloneWindows64
path: build/StandaloneWindows64


deployPages:
needs: buildWGL
name: Deploy to Github Pages πŸš€
runs-on: ubuntu-latest
steps:
- name: Checkout code βœ…
uses: actions/checkout@v4

- name: Download Artifact πŸ“¦
uses: actions/[email protected]
with:
name: build-WebGL
path: build/WebGL

- name: Deploy πŸš€
uses: JamesIves/[email protected]
with:
branch: main
folder: docs/WebGL

0 comments on commit 72888c7

Please sign in to comment.