Publish to npm #5
This file contains hidden or 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 to npm | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10.17.1 | |
run_install: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version: 22 | |
registry-url: 'https://registry.npmjs.org/' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build package | |
run: pnpm build | |
- name: Publish to npm | |
run: pnpm publish --access public --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |