From 7037f2920646d99bec98089eafa48bb1f5934c3d Mon Sep 17 00:00:00 2001 From: "xuying.xu" Date: Tue, 15 Oct 2024 10:22:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/auto-release.yml | 12 ++++++++++++ lerna.json | 7 ++----- package.json | 5 +++-- packages/f2/.fatherrc.js | 2 +- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 645a28c54..77c260f68 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -61,6 +61,18 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Get Version + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npm run version + + - name: build + run: | + npm run build + env: + CI: false + - name: Release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/lerna.json b/lerna.json index 7e133f4a9..ddb3faca8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,18 +1,15 @@ { "npmClient": "yarn", - "useWorkspaces": true, + "packages": ["packages/*"], "version": "5.7.0", "command": { "bootstrap": { "ci": false, - "npmClientArgs": [ - "--no-package-lock" - ] + "npmClientArgs": ["--no-package-lock"] }, "publish": { "commitHooks": false, "conventionalCommits": true, - "createRelease": "github", "message": "🤖 publish", "exact": true } diff --git a/package.json b/package.json index ecdcaa1a2..62b5bdb3d 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "lint-fix": "eslint --fix ./", "prettier": "prettier --write './packages/**/*.{ts,tsx}'", "canary": "npm run build && npm run test && lerna publish --canary --dist-tag next", - "release": "lerna publish --yes --summary-file", + "release": "lerna publish from-git --yes --summary-file", + "version": "lerna version", "site:build": "cd ./site && npm run site:build", "site:clean": "cd ./site && npm run site:clean", "site:deploy": "cd ./site && npm run site:deploy", @@ -82,7 +83,7 @@ "jest": "^26.6.3", "jest-electron": "^0.1.12", "jest-image-snapshot": "^6.1.0", - "lerna": "^6.6.2", + "lerna": "^8.1.2", "limit-size": "^0.1.4", "pre-commit": "^1.2.2", "rollup-plugin-visualizer": "^5.6.0", diff --git a/packages/f2/.fatherrc.js b/packages/f2/.fatherrc.js index 8af2fbca5..9a070ee80 100644 --- a/packages/f2/.fatherrc.js +++ b/packages/f2/.fatherrc.js @@ -35,7 +35,7 @@ export default process.env.CI && process.env.CI === 'true' { "search": "VERSION", "searchTemplateStrings": true, - "replace": JSON.stringify(require('./package').version) + "replace": require('../../lerna.json').version } ] }