Skip to content

Build Preservation Python3 with Pygbag #8

Build Preservation Python3 with Pygbag

Build Preservation Python3 with Pygbag #8

Workflow file for this run

name: Build Preservation Python3 with Pygbag
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
permissions:
contents: write
jobs:
build-pygbag:
name: Preservation-python3 Game
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
# Add a step to compile the .po files to .mo files
- name: Compile translation files 🈴
run: |
for po_file in locales/*/LC_MESSAGES/*.po; do
mo_file="${po_file%.po}.mo"
msgfmt "$po_file" -o "$mo_file"
done
- name: Install and Build 🔧
run: |
echo "Attempting to install pygbag"
python -m pip install pygbag
echo "Successfully installed pygbag"
echo "Attempting to build the game"
python -m pygbag --build --template $GITHUB_WORKSPACE/default.tmpl $GITHUB_WORKSPACE/main.py
echo "Successfully build the game and compiled to WebAssembly"
- name: Upload to GitHub pages branch gh-pages 🚀
uses: JamesIves/github-pages-deploy-action@v4.7.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: gh-pages
folder: build/web