-
-
Notifications
You must be signed in to change notification settings - Fork 144
77 lines (65 loc) · 2.12 KB
/
update-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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Update Unity Package
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Delete .cs files from package branch
run: |
git fetch
git checkout unity-package
find Packages/Core/Runtime/Core -name "*.cs" -type f -delete
git config --global user.email "[email protected]"
git config --global user.name "Tom Weiland"
git add Packages
git commit -m "Update package"
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 3.1
- name: Build Riptide
run: |
git checkout main
dotnet build RiptideNetworking/RiptideNetworking.sln
- name: Checkout package branch
run: |
git checkout unity-package
git add Packages
git commit --amend --no-edit
- 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@v3
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
- name: Restore Library cache
uses: actions/cache@v3
with:
path: Library
key: unity-package-project-library
- name: Unity builder
uses: game-ci/[email protected]
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneWindows # This field is required, but won't actually be used because the build method doesn't do anything
buildMethod: MetaGenerator.Build.GenerateMetaFiles
- name: Commit and push changes
run: |
git add Packages
git commit --amend --no-edit
git push