@@ -151,15 +151,6 @@ if [ "$DRY_RUN" = true ]; then
151151 echo " ---"
152152 echo " "
153153
154- # Check for unpushed commits
155- git fetch origin
156- LOCAL_COMMITS=$( git log origin/main..HEAD --oneline 2> /dev/null || git log origin/master..HEAD --oneline 2> /dev/null || echo " " )
157- if [ -n " $LOCAL_COMMITS " ]; then
158- echo " Local commits that would be pushed:"
159- echo " $LOCAL_COMMITS "
160- echo " "
161- fi
162-
163154 echo " 🚫 DRY RUN: No tag created, nothing pushed"
164155else
165156 # Check if tag already exists
@@ -168,31 +159,6 @@ else
168159 exit 1
169160 fi
170161
171- # Fetch to check for unpushed commits
172- echo " Checking for unpushed commits..."
173- git fetch origin
174-
175- # Determine the main branch name
176- MAIN_BRANCH=" main"
177- if ! git show-ref --verify --quiet refs/remotes/origin/main; then
178- MAIN_BRANCH=" master"
179- fi
180-
181- # Check if there are local commits to push
182- LOCAL_COMMITS=$( git log origin/$MAIN_BRANCH ..HEAD --oneline 2> /dev/null || echo " " )
183- if [ -n " $LOCAL_COMMITS " ]; then
184- echo " Pushing local commits first..."
185- echo " Commits to push:"
186- echo " $LOCAL_COMMITS "
187- echo " "
188- git push origin HEAD:$MAIN_BRANCH
189- echo " ✓ Local commits pushed"
190- echo " "
191- else
192- echo " No local commits to push"
193- echo " "
194- fi
195-
196162 # Create tag with message
197163 echo " Creating tag $TAG_NAME ..."
198164 if [ -z " $CHANGES " ]; then
@@ -207,11 +173,11 @@ else
207173 fi
208174 fi
209175
210- # Push tag to trigger CI/CD
176+ # Push tag to trigger publish workflow
211177 echo " Pushing tag to remote..."
212178 git push origin " $TAG_NAME "
213179
214- echo " ✓ Release $TAG_NAME triggered successfully!"
215- echo " The CI workflow will automatically build and publish to npm."
180+ echo " ✓ Tag $TAG_NAME created and pushed successfully!"
181+ echo " The publish workflow will automatically build and publish to npm."
216182fi
217183
0 commit comments