Publish Package to npmjs #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} |