Skip to content

Publish to npm

Publish to npm #4

Workflow file for this run

name: Publish to npm
on:
workflow_dispatch:
pull_request:
types: [closed]
branches: [master]
jobs:
build:
if: |
github.event.pull_request.merged == true &&
!contains(github.event.pull_request.labels.*.name, 'no release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
- name: Build Library
run: npm run build-lib
- name: Publish
run: |
cd dist/ngx-view-state
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}