From 8d733df5ab4a68d9deea0942a8f42f9f04556fe9 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 21 Jan 2026 16:30:12 +0800 Subject: [PATCH 1/2] skill to help bump and release --- .../SKILL.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/skills/http-client-python-bump-and-release/SKILL.md diff --git a/.github/skills/http-client-python-bump-and-release/SKILL.md b/.github/skills/http-client-python-bump-and-release/SKILL.md new file mode 100644 index 00000000000..6b1960de4f4 --- /dev/null +++ b/.github/skills/http-client-python-bump-and-release/SKILL.md @@ -0,0 +1,66 @@ +--- +name: http-client-python-bump-and-release +description: Create a PR to bump dependencies or release a new version of the http-client-python package. Use when the user wants to bump TypeSpec/Azure-tools dependencies, update peer dependencies, or release a new version of the Python HTTP client. +--- + +# HTTP Client Python Bump and Release + +Create a new PR to bump dependencies and release a new version of the http-client-python package. + +> **Note:** `{REPO}` refers to the root folder of the `microsoft/typespec` repository. + +## Prerequisites + +Before starting, verify that `npm-check-updates` is available: +```bash +npx npm-check-updates --version +``` + +If the command fails or prompts for installation, install it globally: +```bash +npm install -g npm-check-updates +``` + +## Workflow + +1. Navigate to the package directory: + ```bash + cd {REPO}/packages/http-client-python + ``` + +2. Reset and sync with main: + ```bash + git reset HEAD && git checkout . && git checkout origin/main && git pull origin main + ``` + +3. Create release branch (use current date in MM-DD format): + ```bash + git checkout -b publish/python-release-{MM-DD} + ``` + +4. Update dependencies: + ```bash + npx npm-check-updates -u --filter @typespec/*,@azure-tools/* --packageFile package.json + ``` + +5. Update `peerDependencies` in package.json: + - If format is `">=0.a.b <1.0.0"`: Update only the `0.a.b` portion, keep the range format unchanged + - If format is `"^1.a.b"`: Update to the latest version + +6. Run version change script: + ```bash + npm run change:version + ``` + +7. Build and commit: + ```bash + npm install && npm run build && git add -u && git commit -m "bump version" + ``` + +8. Push and create PR: + ```bash + cd {REPO} + git push origin HEAD + ``` + +9. Create PR with title `[python] release new version` and no description. From ddc845446d731ee02370ff49e23806475ee87389 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 21 Jan 2026 16:40:10 +0800 Subject: [PATCH 2/2] update --- .../skills/http-client-python-bump-and-release/SKILL.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/skills/http-client-python-bump-and-release/SKILL.md b/.github/skills/http-client-python-bump-and-release/SKILL.md index 6b1960de4f4..03436535b82 100644 --- a/.github/skills/http-client-python-bump-and-release/SKILL.md +++ b/.github/skills/http-client-python-bump-and-release/SKILL.md @@ -12,11 +12,13 @@ Create a new PR to bump dependencies and release a new version of the http-clien ## Prerequisites Before starting, verify that `npm-check-updates` is available: + ```bash npx npm-check-updates --version ``` If the command fails or prompts for installation, install it globally: + ```bash npm install -g npm-check-updates ``` @@ -24,21 +26,25 @@ npm install -g npm-check-updates ## Workflow 1. Navigate to the package directory: + ```bash cd {REPO}/packages/http-client-python ``` 2. Reset and sync with main: + ```bash git reset HEAD && git checkout . && git checkout origin/main && git pull origin main ``` 3. Create release branch (use current date in MM-DD format): + ```bash git checkout -b publish/python-release-{MM-DD} ``` 4. Update dependencies: + ```bash npx npm-check-updates -u --filter @typespec/*,@azure-tools/* --packageFile package.json ``` @@ -48,16 +54,19 @@ npm install -g npm-check-updates - If format is `"^1.a.b"`: Update to the latest version 6. Run version change script: + ```bash npm run change:version ``` 7. Build and commit: + ```bash npm install && npm run build && git add -u && git commit -m "bump version" ``` 8. Push and create PR: + ```bash cd {REPO} git push origin HEAD