From a454639dbe132357bf3559828f5043c226b8dc91 Mon Sep 17 00:00:00 2001 From: yeyan1996 Date: Tue, 30 Apr 2024 11:13:20 +0800 Subject: [PATCH] fix: add prerelease mode --- .github/workflows/release.yml | 6 ++++++ packages/api/package.json | 3 ++- packages/cli/package.json | 3 ++- packages/core/package.json | 3 ++- packages/extension/package.json | 3 ++- packages/userscript/package.json | 3 ++- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5074104b8..edaebe40c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,18 +16,24 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: setup node.js uses: actions/setup-node@v3 with: node-version: 16 + - name: install pnpm run: npm i pnpm@8 -g + - name: Setup npmrc run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + - name: setup pnpm config run: pnpm config set store-dir $PNPM_CACHE_FOLDER + - name: install dependencies run: pnpm install + - name: create and publish versions uses: changesets/action@v1 with: diff --git a/packages/api/package.json b/packages/api/package.json index 949c190d2..7ceed666a 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -27,7 +27,8 @@ "lint": "eslint **/*.ts --fix", "serve": "tsc -w", "test": "jest", - "test:updateSnapshot": "jest --updateSnapshot" + "test:updateSnapshot": "jest --updateSnapshot", + "prepublishOnly": "npm run build" }, "dependencies": { "@apidevtools/json-schema-ref-parser": "9.0.7", diff --git a/packages/cli/package.json b/packages/cli/package.json index 3e20fbfc7..556f76afe 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -28,7 +28,8 @@ "build": "tsc", "lint": "eslint **/*.ts --fix", "debug": "node dist/bin/index.js -c", - "test": "echo \"Error: no test specified\"" + "test": "echo \"Error: no test specified\"", + "prepublishOnly": "npm run build" }, "dependencies": { "@jsdevtools/ono": "^7.1.0", diff --git a/packages/core/package.json b/packages/core/package.json index 0e5775a07..f3dd89601 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -26,7 +26,8 @@ "lint": "eslint **/*.ts --fix", "serve": "tsc -w", "test": "jest", - "test:updateSnapshot": "jest --updateSnapshot" + "test:updateSnapshot": "jest --updateSnapshot", + "prepublishOnly": "npm run build" }, "dependencies": { "api-spec-converter": "^2.12.0", diff --git a/packages/extension/package.json b/packages/extension/package.json index c10bd962f..1138bde78 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -7,7 +7,8 @@ "serve": "vue-cli-service build --mode development --watch", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "test": "echo \"Error: no test specified\"" + "test": "echo \"Error: no test specified\"", + "prepublishOnly": "echo \"Skip publish\"" }, "dependencies": { "core-js": "^3.6.5", diff --git a/packages/userscript/package.json b/packages/userscript/package.json index f2a31e2eb..059012b0c 100644 --- a/packages/userscript/package.json +++ b/packages/userscript/package.json @@ -17,7 +17,8 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "test": "echo \"Error: no test specified\"" + "test": "echo \"Error: no test specified\"", + "prepublishOnly": "npm run build" }, "dependencies": { "@apidevtools/json-schema-ref-parser": "9.0.7",