Skip to content

Commit

Permalink
chore: split ci into two separate workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyzissou authored and wtrocki committed Apr 29, 2021
1 parent f2d1dd4 commit c7982d7
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 97 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build, Lint & Test

on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout master
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Cache Dependencies
id: cache-dependencies
uses: actions/cache@master
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Unit Test
run: yarn test
97 changes: 0 additions & 97 deletions .github/workflows/ci.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release workflow
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
CI: true
steps:
- name: Checkout master
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Cache Dependencies
id: cache-dependencies
uses: actions/cache@master
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Unit Tests
run: yarn test
- name: Publish
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_AUTH_TOKEN}}" > ~/.npmrc && TAG=${GITHUB_REF#"refs/tags/"} npm run release:publish

0 comments on commit c7982d7

Please sign in to comment.