From 54510bb8392fef7fca5e6f4ef67485424f70b50d Mon Sep 17 00:00:00 2001 From: Warren Lee <5959690+wrn14897@users.noreply.github.com> Date: Fri, 29 May 2026 16:08:09 -0700 Subject: [PATCH] fix(release): prevent duplicate git tag push in release script The release script ran `changeset tag` (which creates git tags for all packages) followed by `changeset publish` (which also creates a git tag for each package it publishes to npm). When a publishable package such as @hyperdx/cli was published for the first time in a run, both commands created its tag, so the changesets GitHub Action queued the same tag for push twice. The second push failed with: ! [remote rejected] @hyperdx/cli@0.5.0 (cannot lock ref ...: reference already exists) error: failed to push some refs which aborted the whole release job (gating all downstream Docker/CLI builds), even though the npm publish itself had already succeeded. Run `changeset publish --no-git-tag` so publish handles npm only, leaving `changeset tag` as the single source of git tags for every package (public and private). Each tag is now created and pushed exactly once. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e2133c7e01..4e1cfa3c04 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "lint": "npx nx run-many -t ci:lint", "lint:fix": "npx nx run-many -t lint:fix", "version": "make version", - "release": "npx changeset tag && npx changeset publish" + "release": "npx changeset publish --no-git-tag && npx changeset tag" }, "lint-staged": { "packages/api/src/routers/external-api/**/*.ts": [