Skip to content

Commit

Permalink
fix: 调整获取版本时机 (#2009)
Browse files Browse the repository at this point in the history
Co-authored-by: xuying.xu <[email protected]>
  • Loading branch information
tangying1027 and xuying.xu authored Oct 15, 2024
1 parent 534bc11 commit f74c17b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 2 additions & 5 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/f2/.fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Expand Down

0 comments on commit f74c17b

Please sign in to comment.