-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.03 KB
/
build-unity-package.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
name: Build UnityPackage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-unitypackage:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
- run: |
echo "Assets/RudderStack.meta" > metaList
find Assets/RudderStack/ -name \*.meta >> metaList
# Step 2: Set up Unity
uses: game-ci/unity-actions/setup@v2
with:
unityVersion: 2022.3.16f1
# Step 3: Run Unity in batch mode to export the package
- run: mkdir Builds
- name: Build .unitypackage
run: |
/opt/unity/Editor/Unity \
-batchmode \
-nographics \
-quit \
-projectPath ./ \
-executeMethod PackageExporter.ExportPackage
# Step 4: Upload the built package as an artifact
- name: Upload .unitypackage
uses: actions/upload-artifact@v3
with:
name: RudderStackUnityPackage
path: Builds/RudderStackUnity.unitypackage