Skip to content

Build & Publish to NPM #51

Build & Publish to NPM

Build & Publish to NPM #51

Workflow file for this run

name: Build & Publish to NPM
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Enable Corepack for Yarn 4
run: |
corepack enable
- name: Install 💻
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build 🔧
uses: borales/actions-yarn@v4
with:
cmd: build
- name: Publish package on NPM 📦
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}