This repository has been archived by the owner on Jul 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 1.63 KB
/
CI.yml
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
55
56
57
58
59
60
61
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version:
- 16.x
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{matrix.node-version}}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run Tests 🧪
run: yarn run coverage
- name: Report coverage (client) 📏
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: ./packages/client
flags: client
Publish:
runs-on: ubuntu-latest
needs:
- Test
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
registry-url: https://registry.npmjs.org
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Publish 🚀
run: yarn run semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}