name: CI & CD
on: push
jobs:
  build:
    environment: prod
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x, 16.x]
        # TODO - add 18 when it is released

    steps:
      - uses: actions/checkout@v1
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: GitHub Action for Yarn
        uses: Borales/actions-yarn@v2.3.0
      - name: yarn install, build, and test
        run: |
          yarn test
      - name: Deploy
        if: github.ref == 'refs/heads/main' && matrix.node-version == '12.x'
        run: npx semantic-release
        env:
          CI: true
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

Add github CI action initial version
Add github CI action initial version
