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