Skip to content

Bump version (TFVPKTool update) #98

Bump version (TFVPKTool update)

Bump version (TFVPKTool update) #98

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
delete-artifacts:
name: Delete old artifacts
runs-on: ubuntu-latest
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 15minutes
build_win:
name: Build (Windows)
runs-on: windows-2022
needs: delete-artifacts
steps:
- name: Setup node
uses: actions/setup-node@master
- name: Checkout Harmony VPK Tool
uses: actions/checkout@v3
with:
path: main
- name: Checkout tf_lzham
uses: actions/checkout@v3
with:
repository: 'barnabwhy/tf_lzham'
path: lzham
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Compile lzham
run: |
cd lzham
msbuild ./dev/vproj/liblzham.vcxproj /p:Configuration=Release /p:Platform=x64
- name: Checkout TFVPKTool
uses: actions/checkout@v3
with:
repository: 'barnabwhy/TFVPKTool'
path: tfvpktool
- name: Compile TFVPKTool
run: |
del tfvpktool/src/lzham/lib/liblzham_x64.lib
move lzham/dev/vproj/lib/Release/liblzham_x64.lib tfvpktool/src/lzham/lib/liblzham_x64.lib
cd tfvpktool
npm install
npm run compile:base
mkdir dist/build/Release
move src/build/Release/lzham.node dist/build/Release/lzham.node
move LICENSE.md dist/LICENSE.md
- name: Move compiled TFVPKTool to Harmony VPK Tool
run: |
move tfvpktool/dist main/tfvpktool
- name: NPM install
run: |
cd main
npm install
- name: Build
run: |
cd main
npm run build:windows
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Harmony VPK Tool - x64 Portable
path: main/builds/Harmony VPK Tool*.exe
build_linux:
name: Build (Linux)
runs-on: ubuntu-latest
needs: delete-artifacts
steps:
- name: Setup node
uses: actions/setup-node@master
- name: Checkout Harmony VPK Tool
uses: actions/checkout@v3
with:
path: main
- name: Checkout tf_lzham
uses: actions/checkout@v3
with:
repository: 'barnabwhy/tf_lzham'
path: lzham
- name: Compile lzham
run: |
cd lzham
cmake -S "." -B "build" -G "Unix Makefiles"
cmake --build "build"
ls build/dev/vproj
- name: Checkout TFVPKTool
uses: actions/checkout@v3
with:
repository: 'barnabwhy/TFVPKTool'
path: tfvpktool
- name: Compile TFVPKTool
run: |
rm tfvpktool/src/lzham/lib/liblzham_x64.lib
mv lzham/build/dev/vproj/libliblzham.a tfvpktool/src/lzham/lib/libliblzham.a
cd tfvpktool
sed -i 's/liblzham_x64.lib/libliblzham.a/g' src/binding.gyp
sed -i 's/c++20/c++2a/g' src/binding.gyp
npm install
npm run compile:base
mkdir -p dist/build/Release
mv src/build/Release/lzham.node dist/build/Release/lzham.node
mv LICENSE.md dist/LICENSE.md
- name: Move compiled TFVPKTool to Harmony VPK Tool
run: |
mv tfvpktool/dist main/tfvpktool
- name: NPM install
run: |
cd main
npm install
- name: Build
run: |
cd main
npm run build:linux
- uses: actions/upload-artifact@v3
with:
name: Harmony VPK Tool - AppImage
path: main/builds/Harmony VPK Tool*.AppImage