Skip to content

Support create-next-app@15 with the setup wizard (#340) #1311

Support create-next-app@15 with the setup wizard (#340)

Support create-next-app@15 with the setup wizard (#340) #1311

name: Lint & build
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
jobs:
lint_and_build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.1.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create .env.production.local file for apps/backend
run: cp apps/backend/.env.development apps/backend/.env.production.local
- name: Create .env.production.local file for apps/dashboard
run: cp apps/dashboard/.env.development apps/dashboard/.env.production.local
- name: Create .env.production.local file for apps/e2e
run: cp apps/e2e/.env.development apps/e2e/.env.production.local
- name: Create .env.production.local file for examples/cjs-test
run: cp examples/cjs-test/.env.development examples/cjs-test/.env.production.local
- name: Create .env.production.local file for examples/demo
run: cp examples/demo/.env.development examples/demo/.env.production.local
- name: Create .env.production.local file for examples/docs-examples
run: cp examples/docs-examples/.env.development examples/docs-examples/.env.production.local
- name: Create .env.production.local file for examples/e-commerce
run: cp examples/e-commerce/.env.development examples/e-commerce/.env.production.local
- name: Create .env.production.local file for examples/middleware
run: cp examples/middleware/.env.development examples/middleware/.env.production.local
- name: Create .env.production.local file for examples/partial-prerendering
run: cp examples/partial-prerendering/.env.development examples/partial-prerendering/.env.production.local
- name: Create .env.production.local file for examples/supabase
run: cp examples/supabase/.env.development examples/supabase/.env.production.local
- name: Build
run: pnpm build
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck
- name: Check for uncommitted changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Error: There are uncommitted changes after build/lint/typecheck."
echo "Please commit all changes before pushing."
git status
exit 1
fi