From 449f31dd8b7df12965f65d9da774597332fc153d Mon Sep 17 00:00:00 2001 From: Kayshen-X Date: Mon, 10 Aug 2026 16:43:00 +0800 Subject: [PATCH] fix(ci): avoid release branch tag ambiguity --- .github/workflows/rust-release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 6a6b0a611..f18262cf2 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -1039,6 +1039,11 @@ jobs: fi git switch --force-create "$target_branch" "origin/${target_branch}" + # Release branches share their name with the release tag. Remove the + # runner-local tag so create-pull-request's `symbolic-ref --short` + # resolves vX.Y.Z instead of heads/vX.Y.Z (and then tries the + # nonexistent origin/heads/vX.Y.Z remote-tracking branch). + git update-ref -d "refs/tags/${target_branch}" printf '%s\n' "$manifest" > nix/release-manifest.json echo "target-branch=$target_branch" >> "$GITHUB_OUTPUT"