on:
  push:
    branches:
      - master

name: Publish

jobs:
  all:
    name: Publish
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Get yarn cache directory path
      id: yarn-cache-dir-path
      run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
    - uses: actions/cache@v2
      id: yarn-cache
      with:
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
        restore-keys: ${{ runner.os }}-yarn-
    - name: Yarn Install
      run: yarn install
    - name: Yarn Test
      run: yarn test
    - name: Publish
      if: github.ref == 'refs/heads/master'
      uses: mikeal/merge-release@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

on:
  push:
    branches:
      - main

name: Publish

jobs:
  all:
    name: Publish
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Get yarn cache directory path
      id: yarn-cache-dir-path
      run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
    - uses: actions/cache@v2
      id: yarn-cache
      with:
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
        restore-keys: ${{ runner.os }}-yarn-
    - name: Yarn Install
      run: yarn install
    - name: Yarn Test
      run: yarn test
    - name: Publish
      if: github.ref == 'refs/heads/master'
      uses: mikeal/merge-release@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

Update to use main branch
Update to use main branch