Skip to content

Commit 64be4e3

Browse files
committed
ci(release): pin the Latest badge to the Codeman release
The workspace publishes two packages, changesets creates a GitHub release for each, and GitHub awards "Latest" to whichever was published last. That is a race: 1.9.2 kept the badge, 1.9.4 lost it to xterm-zerolag-input@0.1.7 by two seconds. Set make_latest in the rename PATCH, which runs after every package release already exists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent cb7d0ba commit 64be4e3

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,20 @@ jobs:
5252
OLD_TAG="aicodeman@${VERSION}"
5353
NEW_TAG="codeman@${VERSION}"
5454
55-
# Update the GitHub release BEFORE deleting the old tag
55+
# Update the GitHub release BEFORE deleting the old tag.
56+
# make_latest pins the "Latest" badge to the Codeman release. This repo
57+
# publishes TWO packages (aicodeman + xterm-zerolag-input), changesets
58+
# creates a GitHub release for each, and GitHub awards "Latest" to
59+
# whichever was published LAST. That is a race: 1.9.2 kept the badge,
60+
# 1.9.4 lost it to xterm-zerolag-input@0.1.7 by two seconds. All package
61+
# releases already exist by the time this step runs, so setting it here
62+
# is deterministic.
5663
RELEASE_ID=$(gh release view "$OLD_TAG" --json databaseId -q .databaseId 2>/dev/null || true)
5764
if [ -n "$RELEASE_ID" ]; then
5865
gh api -X PATCH "repos/${{ github.repository }}/releases/${RELEASE_ID}" \
5966
-f tag_name="$NEW_TAG" \
60-
-f name="$NEW_TAG"
67+
-f name="$NEW_TAG" \
68+
-f make_latest=true
6169
fi
6270
6371
# Retag

0 commit comments

Comments
 (0)