From 9ded0499e83efd1829ab460ee1b39e09720b506e Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 20 Nov 2023 19:22:06 +0000 Subject: [PATCH 1/2] Add publishing pipeline --- .github/workflows/publish.yml | 20 ++++++++++++++++++++ package.json | 10 +++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..5fdb04a4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish Package to npmjs +on: + push: + tags: + - '*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - run: npm version from-git --git-tag-version=false + - run: npm ci + - run: npm run rollup + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/package.json b/package.json index d3f9391f..bf427ef6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { - "version": "0.1.0", + "name": "@code0-tech/base-ui-test", + "version": "0.0.0", "description": "A simple template for a custom React component library", "scripts": { "rollup": "rollup -c", @@ -7,8 +8,8 @@ "storybook": "storybook dev -p 6006", "build-storybook": "storybook build" }, - "author": "YOUR_NAME", - "license": "ISC", + "author": "Code0", + "license": "MIT", "devDependencies": { "@babel/core": "^7.16.0", "@babel/preset-env": "^7.16.4", @@ -51,5 +52,8 @@ "peerDependencies": { "react": "18.2.0", "react-dom": "18.2.0" + }, + "publishConfig": { + "access": "public" } } From f7383d74608e494983a0439933f09638161b4c3e Mon Sep 17 00:00:00 2001 From: Niklas van Schrick Date: Mon, 20 Nov 2023 20:37:47 +0100 Subject: [PATCH 2/2] Remove test from package name --- package-lock.json | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 424b737c..2fa9e30e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,13 @@ { - "name": "base-ui", - "version": "0.1.0", + "name": "@code0-tech/base-ui", + "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "version": "0.1.0", - "license": "ISC", + "name": "@code0-tech/base-ui", + "version": "0.0.0", + "license": "MIT", "devDependencies": { "@babel/core": "^7.16.0", "@babel/preset-env": "^7.16.4", diff --git a/package.json b/package.json index bf427ef6..8c14605f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@code0-tech/base-ui-test", + "name": "@code0-tech/base-ui", "version": "0.0.0", "description": "A simple template for a custom React component library", "scripts": {