-
Notifications
You must be signed in to change notification settings - Fork 1
230 lines (183 loc) · 6.32 KB
/
release.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: Release Drafter
on:
workflow_dispatch:
push:
branches: [ master ]
permissions:
contents: read
jobs:
upload-plugin-unity-artifact:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build flatbuffers
run: python ExternalTools/BuildScripts/build_flatbuffers_csharp.py
- name: Build Websocket-CSharp
run: python ExternalTools/BuildScripts/build_websocket_csharp.py
- name: Setup unity
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: Plugins/Unity/project
buildMethod: GenUnityPackage.Export
- name: Upload Artifact Unity
uses: actions/upload-artifact@v3
with:
name: Artifact-Unity-Plugin
path: Plugins/Unity/Artifact
upload-plugins-artifact:
permissions:
contents: write
pull-requests: write
strategy:
matrix:
runs-on: [windows-latest, macos-latest, ubuntu-latest, ]
runs-on: ${{ matrix.runs-on }}
env:
Builder: 1
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install SCons
- name: Set up .NET Core
if: runner.os == 'Linux'
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Install cmake on ubuntu-latest
if: runner.os == 'Linux'
run: |
sudo apt update -y
sudo apt install -y cmake
- name: Install cmake on macos-latest
if: runner.os == 'macOS'
run: |
brew update
brew install cmake
- name: Install cmake on windows-latest
if: runner.os == 'Windows'
run: |
choco install cmake
- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/[email protected]
- name: Build flatbuffers
run: python ExternalTools/BuildScripts/build_flatbuffers.py
- name: Build Godot
run: python ExternalTools/BuildScripts/build_godot.py
- name: Upload Artifact Godot
uses: actions/upload-artifact@v3
with:
name: Artifact-Godot-Plugin
path: Plugins/Godot/project/addons
- name: Upload Artifact UnrealEngine
uses: actions/upload-artifact@v3
with:
name: Artifact-UnrealEngine-Plugin
path: Plugins/UnrealEngine
upload-app-artifact:
permissions:
contents: write
pull-requests: write
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Build C# application
run: dotnet build Application/BocchiTracker.WPF.sln -c Release
- name: Upload Artifact Application
uses: actions/upload-artifact@v3
with:
name: Artifact-BocchiTracker
path: Application/WPF/Artifact/Release/net7.0-windows
create_draft_release:
needs: [upload-app-artifact, upload-plugins-artifact, upload-plugin-unity-artifact]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
path: Artifacts
pattern: Artifact-*
merge-multiple: true
- name: Delete drafts
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release draft
uses: release-drafter/release-drafter@v5
id: create_draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Application
run: zip -r BocchiTracker.zip ./Artifacts/Artifact-BocchiTracker
- name: Archive UnrealEngine plugin
run: zip -r UnrealEngine.zip ./Artifacts/Artifact-UnrealEngine-Plugin
- name: Archive Godot plugin
run: zip -r Godot.zip ./Artifacts/Artifact-Godot-Plugin
- name: Upload Application
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
asset_path: ./BocchiTracker.zip
asset_name: BocchiTracker.zip
asset_content_type: application/zip
- name: Upload UnrealEngine plugin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
asset_path: ./UnrealEngine.zip
asset_name: UnrealEngine.zip
asset_content_type: application/zip
- name: Upload Godot plugin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
asset_path: ./Godot.zip
asset_name: Godot.zip
asset_content_type: application/zip
- name: Upload Unity plugin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_draft.outputs.upload_url }}
asset_path: ./Artifacts/Artifact-Unity-Plugin/BocchiTracker.unitypackage
asset_name: BocchiTracker.unitypackage
asset_content_type: application/zip