name: Release

on:
  push:
    branches: [master]

jobs:
  build-release:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Setup Node JS
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - run: yarn install --ignore-engines
      - run: yarn lint:nofix
      - run: yarn test
      - name: Release to npm 🚀
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: yarn global add semantic-release && semantic-release

name: Release

on:
  push:
    branches: [master]

jobs:
  build-release:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Setup Node JS
        uses: actions/setup-node@v1
        with:
          node-version: 12.x
      - run: yarn install --ignore-engines
      - run: yarn lint:nofix
      - run: yarn test
      - name: Release to npm 🚀
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release

Switch to npx because yarn global add requires more setup
ci: Switch to npx because yarn global add requires more setup

```
/home/runner/work/_temp/3e84396b-a585-4933-994a-8886a8cb901d.sh: line 1: semantic-release: command not found
```
