Skip to content

Commit 8b1e704

Browse files
committed
fix: Update release workflow to handle first release tagging
- Modified the release workflow to ensure that a tag is created for the first release even if the version matches the current version. - Added logic to skip tagging for subsequent releases if the version has not changed, improving the release process and preventing unnecessary tags. These changes enhance the release workflow's functionality and clarity, ensuring proper version management during initial releases.
1 parent c334187 commit 8b1e704

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,12 @@ jobs:
311311
exit 1
312312
fi
313313
314-
if [ "$NEW_VERSION" == "$CURRENT_VERSION" ]; then
314+
# For first release (no previous tag), always create tag even if version matches
315+
# For subsequent releases, skip if version hasn't changed
316+
if [ -z "$LAST_TAG" ]; then
317+
echo "📋 First release: will create tag v$NEW_VERSION even though version matches package.json"
318+
# Don't skip - proceed with tag creation
319+
elif [ "$NEW_VERSION" == "$CURRENT_VERSION" ]; then
315320
echo "⚠️ No version bump needed (already at $CURRENT_VERSION)"
316321
echo "SKIP_RELEASE=true" >> "$GITHUB_OUTPUT"
317322
exit 0

0 commit comments

Comments
 (0)