Skip to content

Migrate to pnpm

Migrate to pnpm #53

# For every push to the master branch, this publishes an NPM package to the
# "unstable" NPM tag.
name: Publish Unstable
on:
push:
branches:
- main
- master
jobs:
publish:
name: "NPM Publish"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm

Check failure on line 26 in .github/workflows/publish-unstable.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-unstable.yml

Invalid workflow file

You have an error in your yaml syntax on line 26
- name: Install Dependencies
run: pnpm install --frozen-lockfile
# This creates an .npmrc that reads the NODE_AUTH_TOKEN environment variable
registry-url: 'https://registry.npmjs.org'
# We need a workspace aware version of npm because our addon is in a subdir but our .npmrc is in the root
- name: npm8
run: npm install -g npm@8
- name: set version
run: npm version --no-git-tag-version --workspaces-update=false `node -e "console.log(require('./package.json').version)"`-unstable.`git rev-parse --short HEAD`
working-directory: addon
- name: npm publish
run: npm publish --tag=unstable --verbose --workspace=addon
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}