Skip to content

Update WebGL Build #913

Update WebGL Build

Update WebGL Build #913

Workflow file for this run

name: Update WebGL Build
on:
schedule:
- cron: 0 8 * * *
workflow_dispatch:
jobs:
Do-The-Thing:
runs-on: ubuntu-latest
container:
image: sharkwouter/pspdev
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Get apt ready
run: |
apt update
apt install -y zip unzip wget curl git jq bash ffmpeg
- name: Download assets
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
cd $GITHUB_WORKSPACE
wget -nc https://github.com/nzp-team/fteqw/releases/download/bleeding-edge/pc-nzp-web.zip
wget -nc https://github.com/nzp-team/assets/releases/download/newest/pc-nzp-assets.zip
wget -nc https://github.com/nzp-team/quakec/releases/download/bleeding-edge/fte-nzp-qc.zip
wget -nc https://github.com/nzp-team/nzportable/releases/download/nightly/build-version.txt
- name: Create .PK3
run: |
cd $GITHUB_WORKSPACE
rm nzp/game.pk3
mkdir tmp
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/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: |
cd $GITHUB_WORKSPACE
unzip -q pc-nzp-web.zip -d tmp/
mv tmp/ftewebgl.wasm ./
mv tmp/ftewebgl.js ./
- name: Trash stuff
run: |
cd $GITHUB_WORKSPACE
rm -rf tmp/
rm pc-nzp-web.zip
rm pc-nzp-assets.zip
rm fte-nzp-qc.zip
- name: Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update NZ:P
branch: main
commit_user_name: Awesome NZ:P Updater Bot
commit_user_email: [email protected]