-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.48 KB
/
ci.yml
File metadata and controls
54 lines (54 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
cache: yarn
- name: Install dependencies
run: yarn install
- name: Test
run: yarn test
- name: Upload codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/*/coverage/lcov.info
fail_ci_if_error: true
release:
if: github.ref == 'refs/heads/master'
needs: [test]
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 12
registry-url: "https://registry.npmjs.org"
- name: Configure CI Git User
run: |
git config --global user.email adrigzr@users.noreply.github.com
git config --global user.name adrigzr
- name: Install dependencies
run: yarn install
- name: Release
run: |
lerna version --yes
lerna publish from-package --yes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}