Publish CLI to NPM #1
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
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 }} |