Skip to content

Merge pull request #225 from idlechild/master #226

Merge pull request #225 from idlechild/master

Merge pull request #225 from idlechild/master #226

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and deploy patches and website
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update -yq && sudo apt-get install cmake build-essential python3.10 -yq
mkdir asar
- name: Download and build asar
working-directory: ./asar
run: |
curl -sSL "https://github.com/RPGHacker/asar/archive/v1.81.tar.gz" -o v1.81.tar.gz
tar xfz v1.81.tar.gz
cd asar-1.81
cmake src
make
- name: Build practice hack patches
run: |
cp ./asar/asar-1.81/asar/asar-standalone ./tools/asar
chmod +x ./build.sh
chmod +x ./build_PAL.sh
./build.sh
./build_PAL.sh
mkdir ./web/public/patches
cp build/smhack20_sd2snes.ips ./web/public/patches/sd2snes-ntsc.ips
cp build/smhack20_tinystates.ips ./web/public/patches/tinystates-ntsc.ips
cp build/smhack20.ips ./web/public/patches/emulator-ntsc.ips
cp build/smpalhack20_sd2snes.ips ./web/public/patches/sd2snes-pal.ips
cp build/smpalhack20_tinystates.ips ./web/public/patches/tinystates-pal.ips
cp build/smpalhack20.ips ./web/public/patches/emulator-pal.ips
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Patches & Debug Symbols
path: ./build
- name: Set up node
uses: actions/setup-node@v4
- name: Build and export web application
working-directory: ./web
run: |
npm i
npx next build
npx next export
touch ./out/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./web/out/ # The folder the action should deploy.