Skip to content

Merge pull request #10 from DuncanMcPherson/test-subscription-counter #10

Merge pull request #10 from DuncanMcPherson/test-subscription-counter

Merge pull request #10 from DuncanMcPherson/test-subscription-counter #10

Workflow file for this run

name: Deploy 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
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
- run: npm run setup-package
- run: cd dist
- run: npm pack && npm publish
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Node Modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ hashFiles('**/package-lock.json') }}
- run: npm install
- run: npm run cover
- name: Upload results to CodeCov
if: always()
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}