Skip to content

Commit f7bed02

Browse files
author
xuying.xu
committed
fix: 调整获取版本时机
1 parent 534bc11 commit f7bed02

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

.github/workflows/auto-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@ jobs:
6161
env:
6262
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6363

64+
- name: Get Version
65+
env:
66+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
68+
run: npm run version
69+
70+
- name: build
71+
run: |
72+
npm run build
73+
env:
74+
CI: false
75+
6476
- name: Release
6577
env:
6678
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lerna.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
{
22
"npmClient": "yarn",
3-
"useWorkspaces": true,
3+
"packages": ["packages/*"],
44
"version": "5.7.0",
55
"command": {
66
"bootstrap": {
77
"ci": false,
8-
"npmClientArgs": [
9-
"--no-package-lock"
10-
]
8+
"npmClientArgs": ["--no-package-lock"]
119
},
1210
"publish": {
1311
"commitHooks": false,
1412
"conventionalCommits": true,
15-
"createRelease": "github",
1613
"message": "🤖 publish",
1714
"exact": true
1815
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"prettier": "prettier --write './packages/**/*.{ts,tsx}'",
4343
"canary": "npm run build && npm run test && lerna publish --canary --dist-tag next",
4444
"release": "lerna publish --yes --summary-file",
45+
"version": "lerna version --json",
4546
"site:build": "cd ./site && npm run site:build",
4647
"site:clean": "cd ./site && npm run site:clean",
4748
"site:deploy": "cd ./site && npm run site:deploy",
@@ -82,7 +83,7 @@
8283
"jest": "^26.6.3",
8384
"jest-electron": "^0.1.12",
8485
"jest-image-snapshot": "^6.1.0",
85-
"lerna": "^6.6.2",
86+
"lerna": "^8.1.2",
8687
"limit-size": "^0.1.4",
8788
"pre-commit": "^1.2.2",
8889
"rollup-plugin-visualizer": "^5.6.0",

packages/f2/.fatherrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default process.env.CI && process.env.CI === 'true'
3535
{
3636
"search": "VERSION",
3737
"searchTemplateStrings": true,
38-
"replace": JSON.stringify(require('./package').version)
38+
"replace": require('../../lerna.json').version
3939
}
4040
]
4141
}

0 commit comments

Comments
 (0)