From f40cd3995338e452325ae4229e76218bc9c12eff Mon Sep 17 00:00:00 2001 From: Anwarul Islam Date: Fri, 1 Dec 2023 16:43:28 +0600 Subject: [PATCH] feat: publish workflow added --- .github/workflows/publish-npm.yml | 30 +++++++++++++++++++++++++++++ package.json | 32 ++++++++++++++++++++++++------- pnpm-lock.yaml | 24 +++++++++++------------ 3 files changed, 67 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..daa7408 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,30 @@ +name: Publish Package to NPM + +on: + release: + types: [published] + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2.2.4 + with: + version: 8 + run_install: true + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + cache: pnpm + + - name: Publish package + run: pnpm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_ACCESS_TOKEN }} diff --git a/package.json b/package.json index a6ac67a..d777104 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,29 @@ { "name": "@hoppscotch/ui", - "private": true, "version": "0.0.1", - "type": "module", + "license": "MIT", + "description": "Hoppscotch UI", + "author": "Hoppscotch (support@hoppscotch.io)", + "homepage": "https://github.com/hoppscotch/ui", + "bugs": { + "url": "https://github.com/hoppscotch/ui/issues" + }, + "keywords": [ + "ui", + "vue ui", + "vue", + "hoppscotch ui", + "hoppscotch", + "hoppscotch.io", + "hoppscotch api" + ], "scripts": { "dev": "histoire dev", "watch": "vite build --watch", "build": "vite build", "story:build": "histoire build", "story:preview": "histoire preview", - "postinstall": "pnpm run build" + "prepublish": "pnpm run build" }, "peerDependencies": { "vue": "^3.2.25" @@ -50,14 +64,14 @@ "histoire": "^0.12.4", "npm-run-all": "^4.1.5", "postcss": "^8.4.23", - "prettier": "^2.8.4", - "prettier-plugin-tailwindcss": "^0.5.6", + "prettier": "^3.1.0", + "prettier-plugin-tailwindcss": "^0.5.7", "rollup-plugin-polyfill-node": "^0.10.1", "sass": "^1.53.0", "tailwindcss": "^3.3.2", "typescript": "^4.5.4", - "unplugin-icons": "^0.16.1", "unplugin-fonts": "^1.0.3", + "unplugin-icons": "^0.16.1", "unplugin-vue-components": "^0.21.0", "vite": "^3.2.3", "vite-plugin-checker": "^0.5.1", @@ -74,6 +88,10 @@ "vue-router": "^4.0.16", "vue-tsc": "^0.38.2" }, + "engines": { + "node": ">=16" + }, + "type": "module", "files": [ "dist" ], @@ -94,4 +112,4 @@ "./helpers/treeAdapter.ts": "./src/helpers/treeAdapter.ts" }, "types": "./dist/index.d.ts" -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e36502f..6f9e438 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -93,7 +93,7 @@ devDependencies: version: 8.53.0 eslint-plugin-prettier: specifier: ^4.2.1 - version: 4.2.1(eslint@8.53.0)(prettier@2.8.8) + version: 4.2.1(eslint@8.53.0)(prettier@3.1.0) eslint-plugin-vue: specifier: ^9.5.1 version: 9.18.1(eslint@8.53.0) @@ -107,11 +107,11 @@ devDependencies: specifier: ^8.4.23 version: 8.4.31 prettier: - specifier: ^2.8.4 - version: 2.8.8 + specifier: ^3.1.0 + version: 3.1.0 prettier-plugin-tailwindcss: - specifier: ^0.5.6 - version: 0.5.7(prettier@2.8.8) + specifier: ^0.5.7 + version: 0.5.7(prettier@3.1.0) rollup-plugin-polyfill-node: specifier: ^0.10.1 version: 0.10.2(rollup@2.79.1) @@ -3941,7 +3941,7 @@ packages: source-map: 0.6.1 dev: true - /eslint-plugin-prettier@4.2.1(eslint@8.53.0)(prettier@2.8.8): + /eslint-plugin-prettier@4.2.1(eslint@8.53.0)(prettier@3.1.0): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -3953,7 +3953,7 @@ packages: optional: true dependencies: eslint: 8.53.0 - prettier: 2.8.8 + prettier: 3.1.0 prettier-linter-helpers: 1.0.0 dev: true @@ -5756,7 +5756,7 @@ packages: fast-diff: 1.3.0 dev: true - /prettier-plugin-tailwindcss@0.5.7(prettier@2.8.8): + /prettier-plugin-tailwindcss@0.5.7(prettier@3.1.0): resolution: {integrity: sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==} engines: {node: '>=14.21.3'} peerDependencies: @@ -5808,12 +5808,12 @@ packages: prettier-plugin-twig-melody: optional: true dependencies: - prettier: 2.8.8 + prettier: 3.1.0 dev: true - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} + /prettier@3.1.0: + resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + engines: {node: '>=14'} hasBin: true dev: true