Skip to content

Publish Package to npmjs #3

Publish Package to npmjs

Publish Package to npmjs #3

Workflow file for this run

# This workflow will publish a package to npm when a release is published
# For more information, see https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: |
cd builder
npm ci
npm run build
# scoped packages are private by default so need to add public flag
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}