-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (50 loc) · 1.28 KB
/
workflow.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
name: workflow
on:
push:
tags:
- '*.*.*'
branches:
- '**'
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
env:
TZ: Europe/Amsterdam
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
npm ci --ignore-scripts --legacy-peer-deps
npm run test
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [test]
runs-on: ubuntu-latest
env:
TZ: Europe/Amsterdam
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: |
npm ci --ignore-scripts --legacy-peer-deps
npm run build
- run: |
cd dist/ngrx-store-storagesync
version=${{ github.ref_name }}
sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"$version\"/" ./package.json
npm publish