Skip to content

Dump & merge

Dump & merge #484

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: 7.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'