Skip to content

πŸš€ Publish to npmjs.org #8

πŸš€ Publish to npmjs.org

πŸš€ Publish to npmjs.org #8

Workflow file for this run

name: 🚩 Publish to npmjs.org
on:
release:
types: [published]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install dependencies
working-directory: .
run: CI=true pnpm install
- name: Run build
working-directory: .
run: pnpm build
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
working-directory: .
run: pnpm publish --access=public --no-git-checks