From 7a4ecd2b5970ed8b6bfde8938b36917f8e7a7176 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Sun, 28 Sep 2025 11:50:45 -0500 Subject: [PATCH] fix(abacus-react): improve publishing workflow with better version sync MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add git fetch --tags to ensure latest tags are available - Extract version from git tag for precise npm version matching - Improve logging messages for better debugging - Use --allow-same-version flag for npm version command 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/publish-abacus-react.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-abacus-react.yml b/.github/workflows/publish-abacus-react.yml index 4cd8b83f..47e9eca2 100644 --- a/.github/workflows/publish-abacus-react.yml +++ b/.github/workflows/publish-abacus-react.yml @@ -76,9 +76,15 @@ jobs: working-directory: packages/abacus-react run: | # Only publish if semantic-release created a new version + git fetch --tags if git tag --list | grep -q "abacus-react-v"; then - echo "Publishing to GitHub Packages..." + echo "Found abacus-react version tag. Publishing to GitHub Packages..." + # Update package.json version to match the tag + LATEST_TAG=$(git tag --list "abacus-react-v*" | sort -V | tail -1) + VERSION=${LATEST_TAG#abacus-react-v} + echo "Publishing version: $VERSION" + npm version $VERSION --no-git-tag-version --allow-same-version npm publish else - echo "No new version to publish" + echo "No new abacus-react version tag found, skipping publish" fi \ No newline at end of file