Skip to content

Update main.yml with LTF Cache #54

Update main.yml with LTF Cache

Update main.yml with LTF Cache #54

Workflow file for this run

name: Execute tests after push
on:
push:
branches:
- master
jobs:
build:
name: Build my project ✨
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4.1.1
# Git LFS Cache
- 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@v4.0.1
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
# Library Cache
- name: Cache
uses: actions/cache@v4.0.1
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build
uses: game-ci/unity-builder@v4.2.1
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneWindows64
unityVersion: 2022.3.7f1
versioning: Semantic
- uses: actions/upload-artifact@v4.3.1
with:
name: Build
path: build