From cd690bd28c59ffa12e18399c4e9e0cd11dc8ad43 Mon Sep 17 00:00:00 2001 From: anonpenguin23 Date: Tue, 12 May 2026 10:07:34 +0300 Subject: [PATCH] ci(publish-sdk): allow same-version on npm bump When /VERSION is bumped on the source branch before tagging, the SDK package.json already matches the release tag. Without --allow-same-version, npm version errors as 'Version not changed' and the workflow fails on stable main releases (nightly worked by accident because the bump was done in the previous commit cycle and package.json was a step behind). Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/publish-sdk.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-sdk.yml b/.github/workflows/publish-sdk.yml index 1c52d58..646785b 100644 --- a/.github/workflows/publish-sdk.yml +++ b/.github/workflows/publish-sdk.yml @@ -61,9 +61,13 @@ jobs: if [ "${{ github.event_name }}" = "release" ]; then VERSION="${{ github.event.release.tag_name }}" VERSION="${VERSION#v}" - npm version "$VERSION" --no-git-tag-version + # --allow-same-version: when /VERSION was already bumped on the + # source branch before tagging, package.json may already match + # the tag. npm version errors as 'Version not changed' without + # this flag. + npm version "$VERSION" --no-git-tag-version --allow-same-version elif [ -n "${{ inputs.version }}" ]; then - npm version ${{ inputs.version }} --no-git-tag-version + npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version fi - name: Typecheck