Skip to content

Publish Package to npmjs #8

Publish Package to npmjs

Publish Package to npmjs #8

name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
build-lib:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build project with pnpm
run: pnpm rollup-build-lib
publish-gpr:
needs: build-lib
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}