From 48c87a991b5553075ee09cb9d9f8cf7af67a365b Mon Sep 17 00:00:00 2001 From: Niklas Date: Mon, 20 Nov 2023 19:22:06 +0000 Subject: [PATCH] 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..40ef922c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish Package to npmjs +on: + push: + tags: + - '*' +jobs: + build: + 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 $GITHUB_REF_NAME + - 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" } }