Skip to content

Updated README

Updated README #4

Workflow file for this run

name: Node.js Package
on:
release:
types: [created]
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
outputs:
node-version: ${{ steps.node-setup.outputs.node-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: node-setup
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
build:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- npm: npm install
- run: npm ci
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
permissions:
contents: read
packages: write
steps:
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }install
- npm: npm install
- run: npm ci
- npm: npm run build
#- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}