Skip to content

Publish to GitHub Packages #3

Publish to GitHub Packages

Publish to GitHub Packages #3

Workflow file for this run

name: Publish to NPM
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Install dependencies
run: |
cd client
pnpm install
- name: Run tests (if any)
run: |
cd client
pnpm test --if-present
- name: Test package creation
run: |
cd client
npm pack
- name: Publish to NPM
run: |
cd client
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}