Skip to content

Workflow file for this run

name: Format check
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Restore dependencies
uses: actions/cache@v2
with:
path: |
~/.npm
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: Check Realease Status
id: release
run: |
MESSAGE="${{ github.event.head_commit.message }}"
echo "::set-output name=tag::${MESSAGE}"
IS_RELEASE=`echo "${MESSAGE}" | grep -qP "^v\d+\.\d+\.\d+\S*$" && echo true || echo false`
echo "::set-output name=is_release::${IS_RELEASE}"
- name: Format Style
run: yarn format:fix
- name: Check Format Style
run: yarn format