From e5ef3e2474997d7056ea1b8ce350fb48f038e5c6 Mon Sep 17 00:00:00 2001 From: sorrycc Date: Thu, 16 Jan 2025 17:18:04 +0800 Subject: [PATCH] chore: upgrade @umijs/tools and do github release and changelog generate and translation by script --- CONTRIBUTING.md | 11 ++++++----- package.json | 4 ++-- packages/mako/package.json | 2 +- packages/rsc/package.json | 5 +++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0e3b7f147..bf603fc77 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -184,6 +184,12 @@ Open https://github.com/umijs/mako/actions/workflows/node-bind-build.yml?query=e $ git rev-parse HEAD ``` +If you want to translate the changelog automatically, please setup the GEMINI_API_KEY environment variable. GEMINI_API_KEY could be applied from [here](https://aistudio.google.com/apikey) and then add it to environment variables. + +```bash +$ export GEMINI_API_KEY=your-gemini-api-key +``` + Then you can release the new version. ```bash @@ -192,8 +198,3 @@ $ npm run release # if you want to input the version manually $ npm run release -- --bump question ``` - -After release, you must do 2 things: - -- Release the new version on github -- Update the changelog in CHANGELOG.md and CHANGELOG_zh-CN.md diff --git a/package.json b/package.json index 7a7e890b7..526770771 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "test:umi": "node scripts/test-e2e.mjs --fixtures e2e/fixtures.umi --umi", "test:hmr": "node scripts/test-hmr.mjs", "release": "pnpm --filter @umijs/mako release", - "release:rsc": "esno scripts/release-rsc.ts", + "release:rsc": "pnpm --filter @umijs/rsc release", "release:create-mako": "pnpm --filter create-mako release" }, "license": "MIT", @@ -34,7 +34,7 @@ "@types/semver": "^7.5.0", "@umijs/bundler-mako": "workspace:*", "@umijs/mako": "workspace:*", - "@umijs/tools": "^0.1.9", + "@umijs/tools": "^0.1.21", "antd": "^5.12.2", "babel-plugin-import": "^1.13.8", "es-check": "^7.1.1", diff --git a/packages/mako/package.json b/packages/mako/package.json index 7ce31234f..b9567da66 100644 --- a/packages/mako/package.json +++ b/packages/mako/package.json @@ -69,7 +69,7 @@ "napi:build:debug": "napi build --cargo-cwd ../../crates/binding --platform --js src/binding.js --dts src/binding.d.ts", "postbuild": "npm run format", "prepublishOnly": "napi prepublish -t npm", - "release": "utools release --sync-deps ../bundler-mako/package.json,../create-mako/templates/minimal/package.json --sync-versions ../bundler-mako/package.json --sync-publishes ../bundler-mako --git-tag", + "release": "utools release --sync-deps ../bundler-mako/package.json,../create-mako/templates/minimal/package.json --sync-versions ../bundler-mako/package.json --sync-publishes ../bundler-mako --git-tag --changelog", "src:build": "father build", "src:dev": "father dev", "universal": "napi universal", diff --git a/packages/rsc/package.json b/packages/rsc/package.json index ddc834e02..0760d7394 100644 --- a/packages/rsc/package.json +++ b/packages/rsc/package.json @@ -13,9 +13,10 @@ "dist" ], "scripts": { - "format": "biome check --write .", - "dev": "father dev", "build": "father build", + "dev": "father dev", + "format": "biome check --write .", + "release": "utools release", "test": "esno ./src/index.test.ts" }, "repository": "git@github.com:umijs/mako.git"