Skip to content

Add pnpm as a dependency manager and update workflow*** #2

Add pnpm as a dependency manager and update workflow***

Add pnpm as a dependency manager and update workflow*** #2

Workflow file for this run

name: Build and Publish
on:
push:
branches:
- main # or your default branch
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16' # or the version you're using
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
- name: Install pnpm
run: npm install -g pnpm
- name: Change to project directory
run: cd bambujs
- name: Install dependencies with pnpm
run: pnpm install
working-directory: ./bambujs
- name: Build with tsup
run: pnpm exec tsup
working-directory: ./bambujs
- name: Publish to npm
run: pnpm publish --access public
working-directory: ./bambujs
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}