Skip to content

The Open Standard for Generative UI

Setup GH action to publish npm package

Rabi Shanker Guha6986d97ab754
diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml
new file mode 100644
index 000000000..13d2e52d7
--- /dev/null
+++ b/.github/workflows/publish-npm-package.yml
@@ -0,0 +1,34 @@
+name: Publish NPM packages
+
+on:
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: js
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: pnpm/action-setup@v2
+ with:
+ version: 9.0.6
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 18
+ cache: pnpm
+ cache-dependency-path: '**/pnpm-lock.yaml'
+
+ - name: Install dependencies
+ run: pnpm install --frozen-lockfile
+
+ - name: Build affected projects
+ run: pnpm -r run ci
+
+ - name: Check affected projects
+ run: pnpm -r publish
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/js/packages/react-core/package.json b/js/packages/react-core/package.json
index 2adddcb3c..3a0d71a36 100644
--- a/js/packages/react-core/package.json
+++ b/js/packages/react-core/package.json
@@ -1,7 +1,7 @@
{
"name": "@crayonai/react-core",
- "version": "1.0.0",
- "description": "",
+ "version": "0.5.0",
+ "description": "Generative UI SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.json
index bbbe7cee3..94c3d54b5 100644
--- a/js/packages/react-ui/package.json
+++ b/js/packages/react-ui/package.json
@@ -1,8 +1,8 @@
{
"type": "module",
"name": "@crayonai/react-ui",
- "version": "1.0.0",
- "description": "",
+ "version": "0.5.0",
+ "description": "Component library for Generative UI SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {