Skip to content

Publish Package to npmjs #8

Publish Package to npmjs

Publish Package to npmjs #8

Workflow file for this run

name: Publish Package to npmjs
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: Build
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
rm yarn.lock
yarn install
- name: Build
run: |
yarn build
rm README.md
mv .github/workflows/README_mini.md README.md
node .github/workflows/rm-spaces.js
mv .github/workflows/nru.json nru.json
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}