Skip to content

chore(release): publish #676

chore(release): publish

chore(release): publish #676

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Fix `yarn install --frozen-lockfile` not working in monorepo.
# https://github.com/yarnpkg/yarn/issues/5840#issuecomment-468782288
- name: Get checksum before yarn install
id: yarn-lock-check-before
run: echo "::set-output name=sum::$(cksum yarn.lock)"
- run: yarn install --frozen-lockfile
- name: Get checksum after yarn install
id: yarn-lock-check-after
run: echo "::set-output name=sum::$(cksum yarn.lock)"
- name: Exit if yarn.lock updated
run: exit 1
if: steps.yarn-lock-check-before.outputs.sum != steps.yarn-lock-check-after.outputs.sum
- run: yarn build
# - run: yarn test:ci
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# path-to-lcov: ./.coverage/lcov.info
- uses: easyops-cn/actions-next-publish-from-tags@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
if: github.event_name == 'push'