From 1cf07adb30184069ab1ee1a89eb0c63ead620c6b Mon Sep 17 00:00:00 2001 From: nachtjasmin Date: Mon, 5 Sep 2022 10:05:38 +0200 Subject: [PATCH] build: add makefile for easier builds --- .github/workflows/pr.yml | 12 +++--------- Makefile | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 Makefile diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0531953..bbdd662 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bc4fdb7 --- /dev/null +++ b/Makefile @@ -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 +