Skip to content

Get Hash File

Get Hash File #12

Workflow file for this run

name: Get Hash File
on:
workflow_dispatch:
inputs:
message:
description: 手动测试
required: false
env:
DOWNLOAD_DIR: ./download
LOG_DIR: ./logs
WORK_DIR: ./work
jobs:
get-list:
runs-on: ubuntu-latest
container:
image: debian:unstable-slim
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install nodejs python3 python3-pip python3-venv git wget curl -y 1>/dev/null
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout REPO
uses: actions/checkout@v4
with:
repository: Virace/lol_extract_voice
path: lol_extract_voice
ref: v3-test
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Download Dependent Programs
run: |
wget https://github.com/Morilli/ManifestDownloader/releases/latest/download/ManifestDownloader
chmod +x ManifestDownloader
- name: Download the required wad file
run: |
mkdir -p $DOWNLOAD_DIR
mkdir -p $LOG_DIR
mkdir -p $WORK_DIR
python3 -m venv .download_venv
. .download_venv/bin/activate
pip install -r requirements.lock 1>/dev/null
python download.py -g c cz -l l lz -o $DOWNLOAD_DIR -d $LOG_DIR -r 5 -m "ManifestDownloader"
echo "LOL_GAME_PATH=$(realpath $DOWNLOAD_DIR)" >> .lol.env
echo "LOL_GAME_REGION=zh_CN" >> .lol.env
echo "LOL_OUTPUT_PATH=$(realpath $WORK_DIR)" >> .lol.env
- name: Get File Hash Table
run: |
python3 -m venv .h.venv
. .h.venv/bin/activate
pip install -r requirements.lock 1>/dev/null
rm .lol.env && mv ../.lol.env .lol.env
python -c "from main import init, get_event_audio_hash_table, HASH_MANAGER; init(); HASH_MANAGER.game_data.update_data(); HASH_MANAGER.game_data_default.update_data(); get_event_audio_hash_table(True)"
working-directory: lol_extract_voice
- name: Compress the hash table file
run: |
tar -czf hash.tar.gz -C "$(realpath $WORK_DIR)" hashes
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: hash
path: |
hash.tar.gz