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 | 12 | - name: Checkout |
022a17cd | 13 | uses: actions/checkout@v2 |
515e5da7 APA |
14 | |
15 | - name: Setup Node | |
022a17cd | 16 | uses: actions/setup-node@v2 |
11caf266 APA |
17 | with: |
18 | node-version: 12 | |
19 | - run: npm ci | |
f4162974 | 20 | - run: npm run test:prod |
ec66e82b | 21 | - run: npm run lint |
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 | 29 | - name: Checkout |
022a17cd | 30 | uses: actions/checkout@v2 |
515e5da7 APA |
31 | |
32 | - name: Setup Node | |
022a17cd | 33 | uses: actions/setup-node@v2 |
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}} |