build: add makefile for easier builds

This commit is contained in:
nachtjasmin 2022-09-05 10:05:38 +02:00
parent 1dd4f6bddb
commit 1cf07adb30
No known key found for this signature in database
2 changed files with 21 additions and 9 deletions

View file

@ -12,11 +12,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Format files using prettier
run: npm run format
- name: Format files
run: make format
- uses: stefanzweifel/git-auto-commit-action@v4
name: Commit possible changes
@ -27,8 +24,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Build the project
run: npm run build
run: make build

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
NPM=npm
.PHONY: install-deps
install-deps:
$(NPM) ci
.PHONY: build
build: install-deps
$(NPM) run build
.PHONY: clean
format: install-deps
$(NPM) run format
.PHONY: test
test: install-deps
$(NPM) run test