Skip to content

Workflow file for this run

name: Publish Package to npmjs
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- name: Auto Test with Coverage
run: npm run coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
directory: ./coverage
- name: Create Release and Upload Release Asset
run: npm i -g github-release-from-changelog && github-release-from-changelog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish to NPMJS
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}