Skip to content

Node.js Package

Node.js Package #4

Workflow file for this run

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: 18
- run: yarn install
- run: yarn build
- run: cp package.json ./build/package.json
- uses: actions/upload-artifact@v3
with:
name: build-artifact
path: ./build
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: ./build
- run: npm publish ./build --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}