Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Commit c7982d7

Browse files
kingsleyzissouwtrocki
authored andcommitted
chore: split ci into two separate workflows
1 parent f2d1dd4 commit c7982d7

File tree

3 files changed

+70
-97
lines changed

3 files changed

+70
-97
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build, Lint & Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 60
13+
steps:
14+
- name: Checkout master
15+
uses: actions/checkout@v2
16+
- name: Use Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 12.x
20+
- name: Cache Dependencies
21+
id: cache-dependencies
22+
uses: actions/cache@master
23+
with:
24+
path: |
25+
node_modules
26+
*/*/node_modules
27+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
28+
- name: Install dependencies
29+
if: steps.cache-dependencies.outputs.cache-hit != 'true'
30+
run: yarn
31+
- name: Build
32+
run: yarn build
33+
- name: Lint
34+
run: yarn lint
35+
- name: Unit Test
36+
run: yarn test

.github/workflows/ci.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release workflow
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 60
10+
env:
11+
CI: true
12+
steps:
13+
- name: Checkout master
14+
uses: actions/checkout@v2
15+
- name: Use Node.js
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 12.x
19+
- name: Cache Dependencies
20+
id: cache-dependencies
21+
uses: actions/cache@master
22+
with:
23+
path: |
24+
node_modules
25+
*/*/node_modules
26+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
27+
- name: Build
28+
run: yarn build
29+
- name: Lint
30+
run: yarn lint
31+
- name: Unit Tests
32+
run: yarn test
33+
- name: Publish
34+
run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_AUTH_TOKEN}}" > ~/.npmrc && TAG=${GITHUB_REF#"refs/tags/"} npm run release:publish

0 commit comments

Comments
 (0)