Skip to content

Publish to NPM

Publish to NPM #21

Workflow file for this run

name: Publish to NPM
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Updated to use v2
- uses: actions/setup-node@v4 # Updated to use v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org/' # Added for npm to configure auth
- name: Install Angular CLI
run: npm install -g @angular/cli @angular/core
- name: Install NPM Dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: dist/ngx-wig/package.json
access: public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Ensure npm can authenticate with your token