Skip to content

Commit b031b97

Browse files
authored
Merge pull request #3 from LLMTooling/claude/fix-workflow-release-01MqJHfYuVw9D1X7KGF9NYZ2
Fix workflow version release issue
2 parents a1f4955 + 471aa6c commit b031b97

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,17 @@ jobs:
3737
3838
- name: Update package version
3939
run: |
40-
npm version ${{ inputs.version }} --no-git-tag-version
41-
echo "Updated package.json to version ${{ inputs.version }}"
40+
CURRENT_VERSION=$(node -p "require('./package.json').version")
41+
TARGET_VERSION="${{ inputs.version }}"
42+
echo "Current version: $CURRENT_VERSION"
43+
echo "Target version: $TARGET_VERSION"
44+
45+
if [ "$CURRENT_VERSION" != "$TARGET_VERSION" ]; then
46+
npm version $TARGET_VERSION --no-git-tag-version
47+
echo "Updated package.json to version $TARGET_VERSION"
48+
else
49+
echo "Version is already $TARGET_VERSION, skipping npm version command"
50+
fi
4251
4352
- name: Install dependencies
4453
run: npm install

0 commit comments

Comments
 (0)