Skip to content

Publish to NPM

Publish to NPM #83

Workflow file for this run

name: Publish to NPM
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "tag name e.g. beta, latest etc."
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
scope: "@provartesting"
- name: Install dependencies and build
run: |
npm install -g @salesforce/cli
yarn
yarn prepack
- name: Display file
run: |
cat /home/runner/work/_temp/.npmrc
cat $NPM_CONFIG_USERCONFIG
- name: Publish package on NPM
run: npm publish --tag "$TAG" --access public
env:
TAG: ${{ github.event.inputs.tag || 'latest' }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}