Skip to content

Commit

Permalink
chore: improve build-time by caching + reducing tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Jun 5, 2021
1 parent 82ca8f3 commit 824ed0d
Showing 1 changed file with 22 additions and 27 deletions.
49 changes: 22 additions & 27 deletions .github/workflows/lint_release.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,58 @@
# 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: Linting and Release
name: Linting, Testing and Release

on:
push:
branches: [master]
branches: [master, next, beta]
pull_request:
branches: [master]

env:
CI: true

jobs:
lint:
runs-on: ubuntu-18.04
lint_test_build_release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [14.x]
os: [ubuntu-18.04]

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v2-beta
with:
node-version: 14.x

- name: Install
run: yarn --frozen-lockfile
- name: Lerna configure
run: |
yarn lerna bootstrap
yarn lerna link
- name: Lint code
run: yarn lint
release:
needs: lint
runs-on: ubuntu-18.04
node-version: ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
- name: Cache
uses: actions/cache@v2
with:
node-version: 14.x
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn --frozen-lockfile

- name: semantic-release Prepare
run: yarn add semantic-release semantic-release-monorepo -W

- name: Lerna configure
run: |
yarn lerna bootstrap
yarn lerna link
- name: Lint code
run: yarn lint

- name: Build
run: yarn build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release
run: yarn semantic-release

0 comments on commit 824ed0d

Please sign in to comment.