File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,15 @@ jobs:
122122
123123 - name : 🔢 Update version in package.json
124124 run : |
125- npm version ${{ needs.determine-release.outputs.version }} --no-git-tag-version
126- echo "Updated version to: $(node -p "require('./package.json').version")"
125+ CURRENT_VERSION=$(node -p "require('./package.json').version")
126+ DESIRED_VERSION="${{ needs.determine-release.outputs.version }}"
127+ if [ "$CURRENT_VERSION" != "$DESIRED_VERSION" ]; then
128+ echo "Updating version from $CURRENT_VERSION to $DESIRED_VERSION"
129+ npm version "$DESIRED_VERSION" --no-git-tag-version
130+ echo "Updated version to: $(node -p \"require('./package.json').version\")"
131+ else
132+ echo "Version already set to $DESIRED_VERSION, skipping update."
133+ fi
127134
128135 - name : 🧪 Run tests (fast check)
129136 run : |
You can’t perform that action at this time.
0 commit comments