-
Notifications
You must be signed in to change notification settings - Fork 55
154 lines (130 loc) · 5.85 KB
/
build.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
name: Build
on:
push:
branches:
- master
- development
paths:
- ".github/workflows/build.yml"
- "FicsItNetworks.uplugin"
- "Content/**"
- "Source/**"
- "ThirdParty/**"
pull_request:
branches:
- "development"
paths:
- "Content/**"
- "Source/**"
- "ThirdParty/**"
workflow_dispatch:
workflow_call:
secrets:
WWISE_EMAIL:
required: true
WWISE_PASSWORD:
required: true
GH_TOKEN:
required: true
WEBHOOK_URL:
required: true
permissions:
actions: read
jobs:
build:
name: Build FicsIt-Networks
runs-on: Windows2019-selfhosted
steps:
- name: Pre Cleanup
run: Remove-Item ${{ github.workspace }}\* -Recurse -Force -Confirm:$false -ErrorAction Ignore
- uses: actions/checkout@v4
with:
repository: satisfactorymodding/SatisfactoryModLoader
ref: refs/heads/dev
path: SatisfactoryModLoader
- uses: actions/checkout@v4
with:
path: SatisfactoryModLoader/Mods/FicsItNetworks
submodules: recursive
- name: Apply FG Patches
working-directory: SatisfactoryModLoader
run: git apply .\Mods\FicsItNetworks\SML_Patch.patch -v
- name: Create UE directory
run: mkdir ue
- name: Download, Extract and Setup UE
working-directory: ue
run: |
gh release download --repo satisfactorymodding/UnrealEngine -p "UnrealEngine-CSS-Editor-Win64.7z.*"
7z x UnrealEngine-CSS-Editor-Win64.7z.001
rm UnrealEngine-CSS-Editor-Win64.7z*
.\\SetupScripts\\Register.bat
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Add Wwise
run: |
7z x -aoa C:\\CI\\Wwise.7z -o'${{ github.workspace }}\SatisfactoryModLoader\Plugins\'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WWISE_EMAIL: ${{ secrets.WWISE_EMAIL }}
WWISE_PASSWORD: ${{ secrets.WWISE_PASSWORD }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
# - name: Generate VS project files
# run: ${{ github.workspace }}\ue\Engine\Build\BatchFiles\Build.bat -projectfiles -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' -game -rocket -progres
- name: Build for Development Editor
run: ${{ github.workspace }}\\ue\\Engine\\Build\\BatchFiles\\Build.bat FactoryEditor Win64 Development -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject'
- name: Build for Shipping/Client EGS
run: ${{ github.workspace }}\\ue\\Engine\\Build\\BatchFiles\\Build.bat FactoryGameEGS Win64 Shipping -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject'
- name: Build for Shipping/Client Steam
run: ${{ github.workspace }}\\ue\\Engine\\Build\\BatchFiles\\Build.bat FactoryGameSteam Win64 Shipping -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject'
- name: Build for Win64 Dedicated Server
run: ${{ github.workspace }}\\ue\\Engine\\Build\\BatchFiles\\Build.bat FactoryServer Win64 Shipping -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject'
- name: Build for Linux Dedicated Server
run: ${{ github.workspace }}\\ue\\Engine\\Build\\BatchFiles\\Build.bat FactoryServer Linux Shipping -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject'
- name: Package FicsItNetworks Mod
run: ${{ github.workspace }}\ue\Engine\Build\BatchFiles\RunUAT.bat -ScriptsForProject='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' PackagePlugin -project='${{ github.workspace }}\SatisfactoryModLoader\FactoryGame.uproject' -clientconfig=Shipping -serverconfig=Shipping -DLCName='FicsItNetworks' -build -utf8output -platform=Win64 -serverplatform=Win64+Linux -nocompileeditor -installed -merge
- name: Upload FicsItNetworks
id: upload-win64
uses: actions/upload-artifact@v4
with:
name: FicsItNetworks
path: ${{github.workspace}}\SatisfactoryModLoader\Saved\ArchivedPlugins\FicsItNetworks\*.zip
- name: Discord Webhook Action
uses: Panakotta00/[email protected]
if: always()
with:
status: ${{ job.status }}
webhook-url: ${{ secrets.WEBHOOK_URL }}
artifact-url: "${{ steps.upload-win64.outputs.artifact-url }}"
artifact-name: 'FicsIt-Networks.zip'
- name: Post Cleanup
if: ${{ !failure() }}
run: Remove-Item C:\actions-runner\_work\FicsIt-Networks\FicsIt-Networks\* -Recurse -Force -Confirm:$false -ErrorAction Ignore
generate-docs:
name: Generate Documentation
runs-on: ubuntu-latest
steps:
- name: Setup steamcmd
uses: CyberAndrii/setup-steamcmd@v1
- name: Download Satisfactroy Dedicated Server
run: |
steamcmd +force_install_dir "${{ github.workspace }}/SatisfactoryDedicatedServer" +login anonymous +app_update 1690800 validate +quit
- name: Download FicsIt-Networks
uses: actions/download-artifact@master
with:
name: FicsItNetworks
path: ${{ github.workspace }}
- name: Install FicsIt-Networks
run: |
unzip FicsItNetworks-LinuxServer.zip -d SatisfactoryDedicatedServer/FactoryGame/Mods/FicsItNetworks
- name: Generate Documentation
working-directory: SatisfactoryDedicatedServer
run: ./FactoryServer.sh -FINGenDocAndQuit
- name: Upload Documentation
id: upload-documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: |
~/.config/Epic/FactoryGame/Saved/FINReflectionDocumentation.json
~/.config/Epic/FactoryGame/Saved/FINLuaDocumentation.lua