Skip to content

Dump & merge

Dump & merge #946

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: 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: Checkout TACTSharp
if: "${{ github.event.inputs.url == '' }}"
uses: actions/checkout@v3
with:
repository: 'Marlamin/TACTSharp'
path: 'TACTSharp'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
10.0.x
- name: Write exes.txt
if: "${{ github.event.inputs.url == '' }}"
run: echo -e "Wow.exe;Wow.exe\nWowT.exe;Wow.exe\nWowB.exe;Wow.exe\nWowClassic.exe;Wow.exe\nWowClassicT.exe;Wow.exe\nWowClassicB.exe;Wow.exe" > $PWD/exes.txt
- name: Create cache dir
if: "${{ github.event.inputs.url == '' }}"
run: mkdir -p cache
- name: Cache
id: cache
uses: actions/cache@v4
if: "${{ github.event.inputs.url == '' }}"
with:
key: tact-cache
path: cache
- name: Run TACTTool (with config)
if: "${{ github.event.inputs.url == '' && github.event.inputs.config != '' }}"
run: dotnet run --project TACTSharp/TACTTool/TACTTool.csproj --configuration Release -- -p ${{ github.event.inputs.product }} -b ${{ github.event.inputs.config }} -m list -i $PWD/exes.txt -o extract
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- name: Run TACTTool (without config)
if: "${{ github.event.inputs.url == '' && github.event.inputs.config == '' }}"
run: dotnet run --project TACTSharp/TACTTool/TACTTool.csproj --configuration Release -- -p ${{ github.event.inputs.product }} -m list -i $PWD/exes.txt -o extract
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
- name: Clean up non-indexes from cache
run: find cache -type f | grep -v index | xargs rm
- name: Rename executable
if: "${{ github.event.inputs.url != '' }}"
run: mkdir -p extract; mv ${{ github.event.inputs.product }}.exe extract/Wow.exe
- name: Dump raw DBDs
run: dotnet run --project $PWD/code/C#/DBDefsDumper/ --configuration Release -- extract/Wow.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'