Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

build(devDep): bump @types/react from 18.2.46 to 18.2.47 #164

build(devDep): bump @types/react from 18.2.46 to 18.2.47

build(devDep): bump @types/react from 18.2.46 to 18.2.47 #164

Workflow file for this run

---
name: NextJS build and release
# description: lint, test, build and release NextJS
on: push
env:
FORCE_COLOR: true # display terminal colors
# APP_NAME: app_name
# GHCR_IMAGE: ghcr.io/<user>/<repo name>
CONTAINER_REGISTRY: ghcr.io
IMAGE_NAME: clumsy-coder/uva-uhunt
####################################################################################################
jobs:
# install npm packages and store them as cache.
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache node modules
id: cache-primes
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
# skip npm ci if `package.json` didn't change
# https://github.com/actions/cache#outputs
# https://github.com/actions/cache#restoring-and-saving-cache-using-a-single-action
- name: Install npm dependencies
if: steps.cache-primes.outputs.cache-hit != 'true'
run: npm ci --include=dev
################################################################################################
# lint source code using ESlint and Typescript
lint:
needs: install
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Lint project
run: npm run lint
################################################################################################
# build NextJS
build:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: build NextJS
run: npm run build
################################################################################################
semantic-release:
# prerequisite of a job that uses matrix
# https://github.com/orgs/community/discussions/42010#discussioncomment-4439644
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- run: npm install --production=false
- name: semantic-release
run: npx semantic-release --ci
env:
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
####################################################################################################