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 } ] }