Final build changes #390
Workflow file for this run
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
# This workflow is triggered on push or pull request events | |
name: Unity CI | |
on: | |
push: | |
pull_request_target: | |
types: [assigned, opened, synchronize, reopened] | |
jobs: | |
# The 'test' job is responsible for running tests on the Unity project | |
test: | |
name: Test | |
runs-on: ubuntu-latest # Specifies the runner environment as the latest Ubuntu | |
steps: | |
# Step to check out the repository code | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true # This will pull LFS files too | |
# Step to cache the Library folder to speed up the job | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} | |
restore-keys: Library- | |
# Step to debug Docker | |
- name: Debug Docker environment | |
run: | | |
docker info | |
docker version | |
# Step to run the Unity tests | |
- name: Run Unity Tests | |
uses: game-ci/unity-test-runner@v4 | |
with: | |
projectPath: 'Crypto Wars' # Specifies project path | |
githubToken: ${{ secrets.GITHUB_TOKEN }} # Built-in GitHub Token to authenticate actions | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} # Unity license secret | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} # Unity Email Secret | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} # Unity Pass Secret | |
################################################################################################################################# | |
# # The 'build' job is dependent on the 'test' job's completion | |
# build: | |
# name: Build | |
# runs-on: ubuntu-latest | |
# needs: test # This ensures that the build job runs only after the test job has completed successfully | |
# steps: | |
# # Step to check out the repository code | |
# - uses: actions/checkout@v4 | |
# with: | |
# lfs: true | |
# # Step to cache the Library folder | |
# - uses: actions/cache@v3 | |
# with: | |
# path: Library | |
# key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} | |
# restore-keys: Library- | |
# # Step to set up the Node.js environment | |
# - name: Use Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: '20' # Specifies Node.js version '20' | |
# # Step to build the Unity project | |
# - name: Build project | |
# uses: game-ci/unity-builder@v4 | |
# with: | |
# projectPath: 'Crypto Wars' # Specifies project path | |
# unityVersion: '2022.3.20f1' # Specifies the Unity version to use for the build | |
# targetPlatform: StandaloneWindows64 # Specifies the build target platform | |
# env: | |
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} # Unity license secret | |
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} # Unity Email Secret | |
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} # Unity Pass Secret | |
# # Step to upload the build as an artifact | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: Build # Name of the artifact | |
# path: build # Directory path of the artifact to upload |