Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 8c822b2

Browse files
authored
Simplify ci workflow
1 parent 4681b7e commit 8c822b2

File tree

1 file changed

+34
-66
lines changed

1 file changed

+34
-66
lines changed

.github/workflows/dotnet.yml

Lines changed: 34 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ on:
77
# Allows you to run this workflow manually from the Actions tab
88
workflow_dispatch:
99

10-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1110
jobs:
12-
# This workflow contains a single job called "build"
1311
build:
14-
# The type of runner that the job will run on
1512
runs-on: windows-latest
1613
if: "!contains(github.event.head_commit.message, '-noci')"
1714

18-
# Steps represent a sequence of tasks that will be executed as part of the job
1915
steps:
20-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
16+
# Checkout latest with submodules
2117
- uses: actions/checkout@v2
2218
with:
2319
submodules: recursive
24-
20+
21+
# Setup tools
2522
- name: Setup msbuild
2623
uses: microsoft/setup-msbuild@v1
2724

@@ -32,113 +29,84 @@ jobs:
3229
nuget-version: '5.x'
3330

3431
# Build Il2CppAssemblyUnhollower
35-
- name: Build Il2CppAssemblyUnhollower
36-
shell: cmd
37-
run: msbuild lib\Il2CppAssemblyUnhollower\UnhollowerBaseLib\UnhollowerBaseLib.csproj -t:Restore -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release
38-
39-
# Restore mcs nuget
40-
- name: Restore mcs nuget
41-
run: nuget restore lib\mcs-unity\mcs.sln
32+
- run: msbuild lib\Il2CppAssemblyUnhollower\UnhollowerBaseLib\UnhollowerBaseLib.csproj -t:Restore -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release
4233

4334
# Build mcs
44-
- name: Build mcs
45-
shell: cmd
46-
run: msbuild lib\mcs-unity\mcs\mcs.csproj -t:Restore -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release
47-
48-
# Restore NuGet packages
49-
- name: Restore UnityExplorer nuget
50-
run: nuget restore src\UnityExplorer.sln
35+
- run: nuget restore lib\mcs-unity\mcs.sln
36+
- run: msbuild lib\mcs-unity\mcs\mcs.csproj -t:Restore -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release
5137

52-
# Build UnityExplorer Releases
53-
54-
- name: Build UnityExplorer BepInEx Il2Cpp
55-
shell: cmd
56-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE_Cpp
57-
58-
- name: Build UnityExplorer BepInEx 5 Mono
59-
shell: cmd
60-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE5_Mono
61-
62-
- name: Build UnityExplorer BepInEx 6 Mono
63-
shell: cmd
64-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE6_Mono
65-
66-
- name: Build UnityExplorer MelonLoader Il2Cpp
67-
shell: cmd
68-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Cpp
69-
70-
- name: Build UnityExplorer MelonLoader Mono
71-
shell: cmd
72-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Mono
73-
74-
- name: Build UnityExplorer MelonLoader Legacy Il2Cpp
75-
shell: cmd
76-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_MLLegacy_Cpp
38+
# Build UnityExplorer releases, and upload artifacts
7739

78-
- name: Build UnityExplorer MelonLoader Legacy Mono
79-
shell: cmd
80-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_MLLegacy_Mono
40+
- run: nuget restore src\UnityExplorer.sln
8141

82-
- name: Build UnityExplorer Standalone Il2Cpp
83-
shell: cmd
84-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Cpp
85-
86-
- name: Build UnityExplorer Standalone Mono
87-
shell: cmd
88-
run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Mono
89-
90-
# Upload artifacts
42+
# BepInEx Il2Cpp
43+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE_Cpp
9144

9245
- uses: actions/upload-artifact@v2
93-
name: Upload BepInEx Il2Cpp zip
9446
with:
9547
name: UnityExplorer.BepInEx.Il2Cpp
9648
path: ./Release/UnityExplorer.BepInEx.Il2Cpp/*
49+
50+
# BepInEx 5 Mono
51+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE5_Mono
9752

9853
- uses: actions/upload-artifact@v2
99-
name: Upload BepInEx 5 Mono zip
10054
with:
10155
name: UnityExplorer.BepInEx5.Mono
10256
path: ./Release/UnityExplorer.BepInEx5.Mono/*
10357

58+
# BepInEx 6 Mono
59+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE6_Mono
60+
10461
- uses: actions/upload-artifact@v2
105-
name: Upload BepInEx 6 Mono zip
10662
with:
10763
name: UnityExplorer.BepInEx6.Mono
10864
path: ./Release/UnityExplorer.BepInEx6.Mono/*
10965

66+
# MelonLoader Il2Cpp
67+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Cpp
68+
11069
- uses: actions/upload-artifact@v2
111-
name: Upload MelonLoader Il2Cpp zip
11270
with:
11371
name: UnityExplorer.MelonLoader.Il2Cpp
11472
path: ./Release/UnityExplorer.MelonLoader.Il2Cpp/*
11573

74+
# MelonLoader Mono
75+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Mono
76+
11677
- uses: actions/upload-artifact@v2
117-
name: Upload MelonLoader Mono zip
11878
with:
11979
name: UnityExplorer.MelonLoader.Mono
12080
path: ./Release/UnityExplorer.MelonLoader.Mono/*
12181

82+
# MelonLoader 0.3.0 Il2Cpp
83+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_MLLegacy_Cpp
84+
12285
- uses: actions/upload-artifact@v2
123-
name: Upload MelonLoader Legacy Il2Cpp zip
12486
with:
12587
name: UnityExplorer.MelonLoader_Legacy.Il2Cpp
12688
path: ./Release/UnityExplorer.MelonLoader_Legacy.Il2Cpp/*
12789

90+
# MelonLoader 0.3.0 Mono
91+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_MLLegacy_Mono
92+
12893
- uses: actions/upload-artifact@v2
129-
name: Upload MelonLoader Legacy Mono zip
13094
with:
13195
name: UnityExplorer.MelonLoader_Legacy.Mono
13296
path: ./Release/UnityExplorer.MelonLoader_Legacy.Mono/*
13397

98+
# Standalone Il2Cpp
99+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Cpp
100+
134101
- uses: actions/upload-artifact@v2
135-
name: Upload Standalone Il2Cpp zip
136102
with:
137103
name: UnityExplorer.Standalone.Il2Cpp
138104
path: ./Release/UnityExplorer.Standalone.Il2Cpp/*
139105

106+
# Standalone Mono
107+
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Mono
108+
140109
- uses: actions/upload-artifact@v2
141-
name: Upload Standalone Mono zip
142110
with:
143111
name: UnityExplorer.Standalone.Mono
144112
path: ./Release/UnityExplorer.Standalone.Mono/*

0 commit comments

Comments
 (0)