Skip to content

chore: update npm version #30

chore: update npm version

chore: update npm version #30

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main # or the branch you want to use for publishing
jobs:
build-and-publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [17]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
scope: '@davstack'
registry-url: 'https://registry.npmjs.org'
# registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: pnpm install
- name: Build package
run: pnpm run build # or the build script you have in your package.json
# - name: Authenticate with npm
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish to npm
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}