From 38bf9e71e9de20af7621125dba7ccdde98f4008b Mon Sep 17 00:00:00 2001 From: gabriel-logan Date: Wed, 19 Jun 2024 15:18:38 -0300 Subject: [PATCH] chore: Add pr-check script for linting and building --- .github/workflows/pr-check.yml | 29 +++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..399d7c0 --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,29 @@ +name: Run PR Check + +on: + pull_request: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: yarn install + + - name: Run PR Check + run: yarn pr-check diff --git a/package.json b/package.json index 76c3fd4..af3270b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "pr-check": "yarn lint && yarn build" }, "dependencies": { "next": "14.2.4",