Use ffmpeg to auto-encode tracks as 8bit .wav for web deployment

This commit is contained in:
cypress 2024-05-21 19:29:09 -07:00 committed by GitHub
parent e032539b38
commit 4d63db8029
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,7 +16,7 @@ jobs:
- name: Get apt ready
run: |
apt update
apt install -y zip unzip wget curl git jq bash
apt install -y zip unzip wget curl git jq bash ffmpeg
- name: Download assets
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
@ -33,7 +33,10 @@ jobs:
unzip -q pc-nzp-assets.zip -d tmp/
unzip -q fte-nzp-qc.zip -d tmp/nzp/
mv build-version.txt tmp/nzp/version.txt
cd tmp/nzp/
cd tmp/nzp/tracks
find . -name '*.ogg' -exec bash -c 'ffmpeg -i $1 -acodec pcm_u8 -ar 16000 ${1%.*}.wav' -- {} \;
rm *.ogg
cd ../
zip -r ../../nzp/game.pk3 ./*
- name: Replace WebAssembly files
run: |
@ -55,5 +58,3 @@ jobs:
branch: main
commit_user_name: Awesome NZ:P Updater Bot
commit_user_email: nope@example.org