From 471aa6cc6b1b78d699ad3a3e6ffed26a5d578b12 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 21 Nov 2025 02:33:25 +0000 Subject: [PATCH] Fix workflow to allow releasing with same version - Add version check before running npm version command - Skip npm version if current version matches target version - Prevents 'Version not changed' error when re-releasing same version --- .github/workflows/release.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a72f7e..2512b45 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,8 +37,17 @@ jobs: - name: Update package version run: | - npm version ${{ inputs.version }} --no-git-tag-version - echo "Updated package.json to version ${{ inputs.version }}" + CURRENT_VERSION=$(node -p "require('./package.json').version") + TARGET_VERSION="${{ inputs.version }}" + echo "Current version: $CURRENT_VERSION" + echo "Target version: $TARGET_VERSION" + + if [ "$CURRENT_VERSION" != "$TARGET_VERSION" ]; then + npm version $TARGET_VERSION --no-git-tag-version + echo "Updated package.json to version $TARGET_VERSION" + else + echo "Version is already $TARGET_VERSION, skipping npm version command" + fi - name: Install dependencies run: npm install