32 lines
730 B
YAML
32 lines
730 B
YAML
name: Publish Package to NPM
|
|
|
|
on:
|
|
release:
|
|
types: [created]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Clean previous build
|
|
run: rm -rf dist
|
|
|
|
- name: Build library
|
|
run: npm run build:lib -- --configuration production
|
|
|
|
- name: Publish to NPM
|
|
run: cd dist/ngx-pendo-lite && npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |