More tile tweaks. #373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install client modules | |
run: cd client && yarn install --immutable | |
- name: Run client ESLint & Prettier | |
run: cd client && yarn run lint | |
- name: Check client types | |
run: cd client && yarn run generate && yarn run tsc | |
- name: Install server modules | |
run: cd server && yarn install --immutable | |
- name: Check server types | |
run: cd server && yarn run build:types | |
build: | |
runs-on: ubuntu-latest | |
needs: [lint] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- run: | | |
git config user.name "O.A.F." | |
git config user.email "<>" | |
- run: cd server && yarn install --immutable | |
- run: cd server && yarn run build | |
- run: cd client && yarn install --immutable | |
- run: cd client && yarn run build | |
- run: | | |
git fetch --all | |
mv server server-files | |
mv client client-files | |
if ! git switch release; then git switch --orphan release; fi | |
- run: | | |
rm -rf relay | |
mkdir -p relay/yorick | |
cp server-files/KoLmafia/relay/* relay/ | |
cp client-files/KoLmafia/relay/relay_YORICK.js relay/ | |
cp -R client-files/build/* relay/yorick/ | |
- run: | | |
git add relay/ | |
{ | |
git commit -m "Build Mafia files for commit $GITHUB_SHA" | |
git push origin release | |
} || exit 0 |