-
Notifications
You must be signed in to change notification settings - Fork 98
78 lines (78 loc) · 2.75 KB
/
dump_and_merge.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
name: Dump & merge
on:
workflow_dispatch:
inputs:
product:
description: Product
required: true
type: string
build:
description: Build
required: true
type: string
url:
description: EXE URL (temp for workflow testing)
required: false
type: string
config:
description: Build config hash
required: false
type: string
jobs:
dumpandmerge:
runs-on: ubuntu-latest
steps:
- name: Set up cache
uses: actions/cache@v3
with:
path: cache
key: cache
restore-keys: cache
- name: Create cache folder
run: mkdir -p cache
- name: Checkout repository
uses: actions/checkout@v3
- name: Download executable
if: "${{ github.event.inputs.url != '' }}"
run: wget -O ${{ github.event.inputs.product }}.exe ${{ github.event.inputs.url }}
- name: Install Lua
if: "${{ github.event.inputs.url == '' }}"
uses: leafo/gh-actions-lua@v9
with:
luaVersion: "5.1.5"
- name: Install LuaRocks
if: "${{ github.event.inputs.url == '' }}"
uses: leafo/gh-actions-luarocks@v4
- name: Set up Luarocks
if: "${{ github.event.inputs.url == '' }}"
run: cd code/lua && luarocks make
- name: Dump exe
if: "${{ github.event.inputs.url == '' }}"
run: getexe ${{ github.event.inputs.product }} ${{ github.event.inputs.config }}
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Dump raw DBDs
run: dotnet run --project $PWD/code/C#/DBDefsDumper/ --configuration Release -- ${{ github.event.inputs.product }}.exe dumpeddbd ${{ github.event.inputs.build }}
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- name: Merge DBDs
run: dotnet run --project $PWD/code/C#/DBDefsMerge/ --configuration Release -- definitions dumpeddbd/${{ github.event.inputs.build }}/ definitions
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- name: Merge manifests
run: dotnet run --project $PWD/code/C#/DBDefsMerge/ --configuration Release -- manifest.json ${{ github.event.inputs.build }}.json manifest.json
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- name: Update repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Merge ${{ github.event.inputs.build }}
file_pattern: 'definitions/* manifest.json'