support snapper as a familiar #4932
Workflow file for this run
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
# This workflow will do a clean install of node dependencies, build the source | |
# code across multiple Node.js versions, and lint the project. | |
name: Build & Lint | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
# Default version of Node.js for jobs | |
node-version: "18" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["18"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn run check | |
#- run: yarn run test TODO: Readd once we have tests | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.node-version }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn run lint | |
build: | |
runs-on: ubuntu-latest | |
needs: [test, lint] | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ env.node-version }} | |
- run: | | |
git config user.name "O.A.F." | |
git config user.email "<>" | |
- run: | | |
cp -R mafia mafiafiles | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build | |
- run: | | |
git fetch --all | |
git switch release | |
rm -r scripts/ | |
rm -r data/ | |
rm -r relay/ | |
rm -r images/ | |
mv KoLmafia/scripts scripts | |
mv KoLmafia/relay relay | |
mv mafiafiles/data ./data | |
mv mafiafiles/dependencies.txt dependencies.txt | |
mv mafiafiles/images ./images | |
- env: | |
MESSAGE: ${{github.event.commits[0].message}} | |
run: | | |
git add scripts/ | |
git add data/ | |
git add relay/ | |
git add images/ | |
git add dependencies.txt | |
{ | |
git commit -m "$MESSAGE" | |
git push origin release | |
} || exit 0 |