diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6579b11..c5bdb56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -182,6 +182,15 @@ jobs: cd u-claw-app npm install --registry=https://registry.npmmirror.com + - name: Sync version from tag + shell: bash + run: | + tag_name="${GITHUB_REF_NAME:-${{ github.event.inputs.tag }}}" + ver="${tag_name#v}" # strip leading v -> 2.1.5 + cd u-claw-app + npm version "$ver" --no-git-tag-version --allow-same-version + echo "桌面版版本号已同步为 $ver" + - name: Build Windows installer shell: cmd run: | @@ -213,6 +222,14 @@ jobs: cd u-claw-app npm install --registry=https://registry.npmmirror.com + - name: Sync version from tag + run: | + tag_name="${GITHUB_REF_NAME:-${{ github.event.inputs.tag }}}" + ver="${tag_name#v}" # strip leading v -> 2.1.5 + cd u-claw-app + npm version "$ver" --no-git-tag-version --allow-same-version + echo "桌面版版本号已同步为 $ver" + - name: Build macOS DMG run: | cd u-claw-app diff --git a/u-claw-app/package.json b/u-claw-app/package.json index de2af4b..2336a5b 100644 --- a/u-claw-app/package.json +++ b/u-claw-app/package.json @@ -1,6 +1,6 @@ { "name": "u-claw", - "version": "2.1.4", + "version": "2.1.5", "description": "U-Claw - AI 助手桌面版,插上 U 盘就能用", "main": "src/main.js", "author": "U-Claw (https://u-claw.org)",