fix(abacus-react): improve publishing workflow with better version sync
- 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 <noreply@anthropic.com>
This commit is contained in:
10
.github/workflows/publish-abacus-react.yml
vendored
10
.github/workflows/publish-abacus-react.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user