npm-publish #63
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 is triggered when a tag v* is pushed to the repository | |
# To release to npm, make sure you incremented the version in package.json | |
# and then run `git tag vx.x.x` and `git push origin vx.x.x` | |
name: npm-publish | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
publish-cli: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org | |
- run: npm ci | |
- run: npm run build | |
- name: Publish CLI | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_AUTH_TOKEN }} |