Skip to content

Node.js Package

Node.js Package #3

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
jobs:
build-and-publish-gpr:
name: Build and Publish
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
pnpm-version: [8.x]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com/
- name: Install pnpm ${{ matrix.pnpm-version }}
uses: pnpm/action-setup@v2
with:
version: ${{ matrix.pnpm-version }}
run_install: true
- run: pnpm build
- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}