-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.02 KB
/
merge.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
name: 'Deploy package to npm'
on:
workflow_dispatch:
push:
branches:
- master
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
build_pack_and_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm ci && npm run build
- run: npm whoami
- run: npm pack
- run: npm publish
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os}}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm ci && npm run test
- name: Upload coverage to codecov
if: always()
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}