Skip to content

Publish Package to NPM registry #6

Publish Package to NPM registry

Publish Package to NPM registry #6

Workflow file for this run

name: Publish Package to NPM registry
on:
release:
types: [created, edited, prereleased]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test --if-present
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
registry-url: https://registry.npmjs.org/
scope: "@xkeshav"
- run: npm ci
- run: npm publish --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}