-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 2.18 KB
/
unity-build-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Run the Linux Build
on:
pull_request:
types:
- opened
- synchronize
push:
branches:
- main
paths:
- src/MinimalUtility.Unity/Assets/**
- src/MinimalUtility.Unity/Packages/**
- src/MinimalUtility.Unity/ProjectSettings/**
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Run the Linux Build
runs-on: ubuntu-latest
steps:
# リポジトリのチェックアウト
- name: Check out my unity project.
uses: actions/checkout@v4.1.1
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
# LFSファイルのキャッシュを取得する
- name: Restore LFS cache
uses: actions/cache@v4.0.2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
# LFSファイルをPullする
- name: Git LFS Pull
run: |
git lfs pull
git add .
git reset --hard
# ファイル名にgitのハッシュを含めたいので$GITHUB_OUTPUTに保存しておく
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
# Cache
- uses: actions/cache@v4.0.2
with:
path: src/MinimalUtility.Unity/Library
key: Library-${{ hashFiles('src/MinimalUtility.Unity/Assets/**', 'src/MinimalUtility.Unity/Packages/**', 'src/MinimalUtility.Unity/ProjectSettings/**') }}
restore-keys: |
Library-
# Unityプロジェクトのビルド
# 設定しない場合、buildフォルダに出力される
- name: Run the LinuxOS build
uses: game-ci/unity-builder@v4.3.0
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
targetPlatform: StandaloneLinux64
unityVersion: auto
projectPath: "src/MinimalUtility.Unity"