Skip to content

.github/workflows/build_html.yml #4

.github/workflows/build_html.yml

.github/workflows/build_html.yml #4

Workflow file for this run

# Controls when the workflow will run
on:
# Allows you to run this workflow manually ftarget the Actions tab
workflow_dispatch:
env:
ARTIFACT_NAME: Formula 1 playdate Html
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Grab FFMPEG
run: |
sudo apt-get update
sudo apt-get install ffmpeg
- name: Checkout Playdate SDL2 Api Sources
uses: actions/checkout@v3
with:
repository: 'joyrider3774/Playdate_Api_SDL2'
- name: Checkout sources
uses: actions/checkout@v3
with:
path: tmp
- name: Checkout EMSDK sources
uses: actions/checkout@v3
with:
path: emsdk
repository: 'emscripten-core/emsdk'
- name: Setup Secret codekey.h File
env:
SECRET: ${{ secrets.FORMULA1_PLAYDATE_CODEKEY }}
run : |
echo "$SECRET" | base64 --decode > tmp/src/codekey.h
- name: Setup EMSDK stuff
run: |
cd emsdk
./emsdk install latest
./emsdk activate latest
- name: move things to correct directories
run: |
rm -rf ./src/srcgame
mv tmp/src ./src/srcgame
cp -Rf tmp/Source/. ./Source
- name: Build Game
run: |
source ./emsdk/emsdk_env.sh
emmake make EMSCRIPTEN_BUILD=1 EMSCRIPTEN_ASYNCIFY=1 "SRC_C_DIR=src/srcgame src/srcgame/scoresubmit" WINDOWSCALE=2 SCREENRESX=320 SCREENRESY=240
- name: Store build
uses: actions/upload-artifact@v3
with:
name: ${{env.ARTIFACT_NAME}}
path: html