name: Build commit

on:
  - push
  - workflow_dispatch

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest

    steps:
      - name: Cache
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: "16"

      - name: Install dependencies
        run: npm ci

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build

      - name: Upload artifact
        uses: actions/upload-artifact@v2
        with:
          name: Reverse-Image-Search-${{github.sha}}
          path: web-ext-artifacts/*.zip
          if-no-files-found: error

name: Build commit

on:
  - push
  - workflow_dispatch

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest

    steps:
      - name: Cache
        uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          node-version: "16"

      - name: Install dependencies
        run: npm ci

      - name: Lint
        run: npm run lint

      - name: Build
        run: npm run build

      - name: Upload artifact
        uses: actions/upload-artifact@v2
        with:
          name: Reverse-Image-Search-${{github.sha}}.zip
          path: public/*
          if-no-files-found: error

Update CI to upload the public directory directly
Update CI to upload the public directory directly
