name: Changelog in sync for packages

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v1

      - name: Setup Node.js 14.x
        uses: actions/setup-node@v1
        with:
          node-version: 14.x

      - name: Install and run changelog check
        run: |
          npm ci
          npm run changelog:check
        env:
          CI: true