Skip to content

Commit 004d3fb

Browse files
authored
Merge pull request #3061 from gluestack/feat/update-npm-v
fix: fixed package version keeping in mind incremental version
2 parents 31d7758 + 8779ecf commit 004d3fb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/publish-production.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ jobs:
361361
echo "published=true" >> $GITHUB_OUTPUT
362362
echo "packages=$PUBLISHED_PACKAGES" >> $GITHUB_OUTPUT
363363
364+
# Update the version output to reflect the actual published version
365+
# Extract the version from the first published package
366+
if [ -n "$PUBLISHED_PACKAGES" ]; then
367+
ACTUAL_VERSION=$(echo "$PUBLISHED_PACKAGES" | tr ' ' '\n' | grep '@' | sed 's/.*@//' | head -n1)
368+
echo "📋 Setting actual published version: $ACTUAL_VERSION"
369+
echo "version=$ACTUAL_VERSION" >> $GITHUB_OUTPUT
370+
else
371+
echo "⚠️ No published packages found, keeping original version"
372+
fi
373+
364374
- name: Update package versions in consuming projects
365375
if: steps.publish.outputs.published == 'true'
366376
run: |

0 commit comments

Comments
 (0)