-
Notifications
You must be signed in to change notification settings - Fork 35
54 lines (48 loc) · 1.44 KB
/
main.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
name: main
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
node: ["14.x", "16.x", "18.x"]
platform: [ubuntu-latest]
name: Node v${{matrix.node}} ((${{matrix.platform}}))
runs-on: ${{matrix.platform}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{matrix.node}}
- run: yarn install --ignore-engines --frozen-lockfile
- name: lint code
run: yarn lerna run lint
- name: run tests
run: yarn lerna run test --stream
- name: coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: false
env:
CI: true
publish:
name: publishing the module
runs-on: 'ubuntu-latest'
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: install dependencies
run: yarn install --ignore-engines
- name: Configure Git User
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: publish
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: yarn lerna publish --no-verify-access