Skip to content

Publish CLI to NPM

Publish CLI to NPM #1

name: Publish CLI to NPM
on:
release:
types: [published]
jobs:
publish-cli:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up Node.js
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: v20
# Install the workspace
- name: Install workspace
run: npm ci
# Build the entire workspace
- name: Build workspace
run: npm run build
# Publish the CLI module
- name: Publish CLI module
run: npm publish --workspace cli
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}