Skip to content

Commit 653268b

Browse files
miguelg719chromiebotChromie Botclaude
authored
fix(ci): handle new tags in server release workflow (#1660) (#1661)
# why The git fetch command was failing with exit code 128 when trying to fetch a tag that doesn't exist on the remote yet (which is the case for new releases). This caused the entire release workflow to fail. # what changed Added `|| true` to allow the fetch to fail gracefully for new tags. The subsequent git rev-parse correctly handles both cases: - Existing tag: script exits with "Tag already exists" message - New tag: script proceeds to create and push the new tag # test plan <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Prevented the server release workflow from failing on new releases by letting git fetch ignore missing remote tags. Existing tags exit with a clear message; new tags proceed to be created and pushed. <sup>Written for commit d71339d. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1661">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. --> Co-authored-by: Chromie <miguel@browserbase.com> Co-authored-by: Chromie Bot <chromie@browserbase.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 55b78b8 commit 653268b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/stagehand-server-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ jobs:
102102
git config user.name "github-actions[bot]"
103103
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
104104
105-
git fetch --force origin "refs/tags/${TAG}:refs/tags/${TAG}"
105+
# Try to fetch the tag if it exists on remote; ignore failure for new tags
106+
git fetch --force origin "refs/tags/${TAG}:refs/tags/${TAG}" 2>/dev/null || true
106107
107108
if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then
108109
echo "Tag already exists: ${TAG}"

0 commit comments

Comments
 (0)