lukaskupczyk/react-hook-consent

View on GitHub
.github/workflows/push.yml

Summary

Maintainability
Test Coverage
# workflow for any push

name: push
on:
  # trigger on feature/* or bug/* branch
  push:
    branches: [feature/*, bug/*]

  # allow manual dispatch
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [18.x]

    steps:
      # checkout repo
      - name: Git checkout
        uses: actions/checkout@v2

      # setup Node.js
      - name: Set Node.js - v${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      # install dependencies
      - name: Install dependencies
        run: yarn

      # run tests
      - name: Run tests
        run: yarn test

      # build dist
      - name: Build package
        run: yarn build