We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a1f4955 + 471aa6c commit b031b97Copy full SHA for b031b97
1 file changed
.github/workflows/release.yml
@@ -37,8 +37,17 @@ jobs:
37
38
- name: Update package version
39
run: |
40
- npm version ${{ inputs.version }} --no-git-tag-version
41
- echo "Updated package.json to version ${{ inputs.version }}"
+ CURRENT_VERSION=$(node -p "require('./package.json').version")
+ 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
51
52
- name: Install dependencies
53
run: npm install
0 commit comments