Skip to content

Publish to npmjs.com #40

Publish to npmjs.com

Publish to npmjs.com #40

Workflow file for this run

name: Publish to npmjs.com
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org/'
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- run: pnpm run build
- run: pnpm run test
# See this issue for more information:
# https://github.com/pnpm/pnpm/issues/5894
- run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}