File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,15 @@ jobs:
3737
3838 - name : Extract version and update package.json
3939 run : |
40- # 从 git tag 获取版本号
41- VERSION=${GITHUB_REF#refs/tags/v}
42- VERSION=${VERSION#${{ github.event.inputs.version != '' && github.event.inputs.version || '' }}
40+ # 从 git tag 获取版本号 (例如 v0.3.8 -> 0.3.8)
41+ VERSION="${GITHUB_REF#refs/tags/v}"
4342 # 如果是 workflow_dispatch 且指定了版本
4443 if [ "${{ github.event.inputs.version }}" != "" ] && [ "${{ github.event.inputs.version }}" != "test" ]; then
4544 VERSION="${{ github.event.inputs.version }}"
4645 fi
4746 echo "Building version: $VERSION"
4847 # 更新 package.json
49- npm version $VERSION --no-git-tag-version
48+ npm version " $VERSION" --no-git-tag-version
5049 shell : bash
5150
5251 - name : Set up Node.js
You can’t perform that action at this time.
0 commit comments