Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Patternfly React Renderer to NPM

on:
push:
tags:
- 'v*'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not big fan of having "v" as prefix in tags.


jobs:
publish:
name: Publish package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: npm
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,23 @@ on:
push:
branches:
- main
paths:
- 'libs_js/next_gen_ui_react/**'
pull_request:
paths:
- 'libs_js/next_gen_ui_react/**'

jobs:
react-tests:
name: React unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs_js/next_gen_ui_react
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: npm
cache-dependency-path: libs_js/next_gen_ui_react/package-lock.json
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
42 changes: 27 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 18 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "dynamicui",
"name": "@rhngui/patternfly-react-renderer",
"private": false,
"version": "0.0.1",
"version": "1.0.0-alpha.0",
"description": "Patternfly React component wrappers for the Next Gen UI Agent",
"type": "module",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand All @@ -12,10 +13,18 @@
"LICENSE"
],
"license": "Apache-2.0",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"exports": {
"import": "./dist/index.es.js",
"require": "./dist/index.cjs.js"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"scripts": {
"dev": "vite",
"build": "vite build",
Expand All @@ -24,7 +33,8 @@
"type-check": "tsc --noEmit",
"lint": "eslint .",
"preview": "vite preview",
"prepack": "cp -f ../../LICENSE ./LICENSE"
"prepack": "cp -f ../../LICENSE ./LICENSE",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

../../LICENSE should be probably removed as well

"prepublishOnly": "npm run build"
},
"dependencies": {
"@patternfly/chatbot": "^6.3.2",
Expand All @@ -33,8 +43,6 @@
"@patternfly/react-core": "^6.3.1",
"@patternfly/react-icons": "^6.3.1",
"@patternfly/react-table": "^6.2.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1",
"victory": "^37.3.6",
Expand All @@ -46,8 +54,8 @@
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/lodash": "^4.17.16",
"@types/react": "^19.1.9",
"@types/react-dom": "^19.1.7",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.7.0",
"eslint": "^9.32.0",
"eslint-plugin-import": "^2.31.0",
Expand All @@ -56,9 +64,11 @@
"globals": "^16.3.0",
"jsdom": "^26.1.0",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"typescript": "~5.8.3",
"typescript-eslint": "^8.39.0",
"vite": "^7.1.0",
"vitest": "^3.1.3"
}
}
}