Skip to content

2.0.7

2.0.7 #7

Workflow file for this run

# This workflow will publish a package to NPM when a release is created
name: Production
# Controls when the workflow will run
on:
release:
types: [ created ]
branches: [ main ]
jobs:
publish:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup Node.js environment"
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: "Install dependencies and build"
run: npm install && npm run build
- name: "Configure NPM registry"
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: '@sapkotamadan'
- name: "Publish to NPM"
run: npm publish ./dist --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}