name: API Continuous Integration

on:
  push:
    branches:
      - master

jobs:
  build:
    name: Sanitize & Tests
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
        registry-url: 'https://npm.pkg.github.com'

    - name: Install dependencies
      run: yarn

    - run: yarn lint
    - run: yarn test

  publish:
    name: Publish packages
    runs-on: ubuntu-latest
    needs: [build]

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v1
      with:
        registry-url: 'https://npm.pkg.github.com'
    - run: npx lerna publish from-package --yes --ignore-scripts --dist-tag latest
      env:
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: API Continuous Integration

on:
  push:
    branches:
      - master

jobs:
  build:
    name: Sanitize & Tests
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]

    steps:
    - uses: actions/checkout@v2

    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
        registry-url: 'https://npm.pkg.github.com'

    - name: Install dependencies
      run: yarn

    - run: yarn lint
    - run: yarn test

  publish:
    name: Publish packages
    runs-on: ubuntu-latest
    needs: [build]

    steps:
    - uses: actions/checkout@v2

    - uses: actions/setup-node@v1
      with:
        node-version: '12.x'
        registry-url: 'https://npm.pkg.github.com'

    - name: Install dependencies
      run: yarn

    - run: npx lerna publish from-package --yes --ignore-scripts --dist-tag latest
      env:
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Install dependencies on publish as well
Install dependencies on publish as well
