Build minified for production (#155)
[poolifier.git] / .github / workflows / npmpublish.yml
1 name: Node.js Package
2
3 on:
4 release:
5 types: [created]
6
7 jobs:
8 build:
9 runs-on: ubuntu-latest
10
11 steps:
12 - name: Checkout
13 uses: actions/checkout@v1
14
15 - name: Setup Node
16 uses: actions/setup-node@v1
17 with:
18 node-version: 12
19 - run: npm ci
20 - run: npm run lint
21 - run: npm run test:prod
22 - run: npm run coverage
23
24 publish-npm:
25 needs: build
26 runs-on: ubuntu-latest
27
28 steps:
29 - name: Checkout
30 uses: actions/checkout@v1
31
32 - name: Setup Node
33 uses: actions/setup-node@v1
34 with:
35 node-version: 12
36 registry-url: https://registry.npmjs.org/
37
38 - name: Install
39 run: npm ci --production
40
41 - name: Publish
42 run: npm publish
43 env:
44 NODE_AUTH_TOKEN: ${{secrets.npm_token}}