Skip to content

Commit

Permalink
fix: 🐛 fix publishing to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
codecret committed Aug 15, 2024
1 parent d90a047 commit 22412c0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,50 @@
name: React components package.
name: React Components Package

on:
push:
branches:
- actiontest
- actiontestnew
pull_request:
branches:
- actiontest
- actiontestnew

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci

publish-gpr:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: http://npm.pkg.github.com
scope: "@reactslice"
registry-url: https://npm.pkg.github.com
scope: "@manyclues"
- run: npm install
- run: npm run build
- run: npm publish
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }}

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@reactslice/reactin-ui",
"name": "@manyclues/iuui",
"private": false,
"version": "0.0.6",
"version": "0.0.2",
"type": "module",
"main": "./dist/reactin.umd.cjs",
"module": "./dist/reactin.js",
"main": "./dist/iuui.umd.cjs",
"module": "./dist/iuui.js",
"publishConfig": {
":registry": "https://npm.pkg.github.com"
"registry": "https://npm.pkg.github.com"
},
"exports": {
".": {
"import": "./dist/reactin.js",
"require": "./dist/reactin.umd.cjs"
"import": "./dist/iuui.js",
"require": "./dist/iuui.umd.cjs"
}
},
"scripts": {
Expand All @@ -31,7 +31,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/reactslice/reactin-ui.git"
"url": "https://github.com/manyclues/iuui.git"
},
"peerDependencies": {
"react": ">=16.0.0"
Expand Down Expand Up @@ -64,7 +64,6 @@
"globals": "^15.9.0",
"postcss": "^8.4.41",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.0",
"vite": "^5.4.0"
Expand Down

0 comments on commit 22412c0

Please sign in to comment.