Skip to content

add action

add action #1

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install PNPM
uses: pnpm/[email protected]
with:
version: latest
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm run build
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish