Skip to content

clean up and use node 20 #2

clean up and use node 20

clean up and use node 20 #2

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- uses: actions/setup-node@v4.0.2
with:
node-version: '20'
- name: Install dependencies
run: |
npm install
- name: Clean, build, format, lint, package, and test
run: |
npm run all
- name: Check if packaged properly
run: |
# If there are any unstaged or untracked files in 'dist/', then the action wasn't packaged properly
if git diff --name-only | grep '^dist/' || git ls-files --other --exclude-standard | grep '^dist/'; then
echo "You didn't package the action properly before pushing to remote." \
echo "Always run 'npm ru all' before staging a commit."
echo "Below are the modified files in 'dist/' after running 'npm && rm -rf dist/ && npm run all':"
git diff --name-only | grep '^dist/'
git ls-files --other --exclude-standard | grep '^dist/'
exit 1
fi