generated from RageAgainstThePixel/upm-template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
62 lines (62 loc) · 2.29 KB
/
unity.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
name: Unity Build And Test
on:
schedule:
- cron: '0 0 * * 0' # Every Sunday at midnight
push:
branches:
- 'main'
pull_request:
branches:
- '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ (github.event_name == 'pull_request' || github.event.action == 'synchronize') }}
jobs:
build:
permissions:
checks: write
pull-requests: write
env:
UNITY_PROJECT_PATH: ''
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
unity-versions: [2021.x, 2022.x, 6000.x]
include:
- os: ubuntu-latest
build-target: StandaloneLinux64
- os: windows-latest
build-target: StandaloneWindows64
- os: macos-15
build-target: StandaloneOSX
steps:
- uses: actions/checkout@v4
- uses: RageAgainstThePixel/unity-setup@v1
with:
unity-version: ${{ matrix.unity-versions }}
build-targets: ${{ matrix.build-target }}
- uses: RageAgainstThePixel/activate-unity-license@v1
with:
license: 'Personal'
username: ${{ secrets.UNITY_USERNAME }}
password: ${{ secrets.UNITY_PASSWORD }}
- uses: RageAgainstThePixel/unity-action@v1
name: '${{ matrix.build-target }}-Validate'
with:
build-target: ${{ matrix.build-target }}
log-name: '${{ matrix.build-target }}-Validate'
args: '-quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset'
- uses: RageAgainstThePixel/unity-action@v1
name: '${{ matrix.build-target }}-Build'
with:
build-target: ${{ matrix.build-target }}
log-name: '${{ matrix.build-target }}-Build'
args: '-quit -nographics -batchmode -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild'
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: '${{ github.run_number }}.${{ github.run_attempt }}-${{ matrix.os }}-${{ matrix.unity-versions }}-${{ matrix.build-target }}-Artifacts'
path: '${{ github.workspace }}/**/*.log'