File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ jobs:
5252 OLD_TAG="aicodeman@${VERSION}"
5353 NEW_TAG="codeman@${VERSION}"
5454
55- # Retag
56- git tag "$NEW_TAG" "$OLD_TAG" 2>/dev/null || true
57- git tag -d "$OLD_TAG" 2>/dev/null || true
58- git push origin "$NEW_TAG" ":refs/tags/$OLD_TAG" 2>/dev/null || true
59-
60- # Update the GitHub release to use the new tag
61- RELEASE_ID=$(gh release view "$OLD_TAG" --json id -q .id 2>/dev/null || true)
55+ # Update the GitHub release BEFORE deleting the old tag
56+ RELEASE_ID=$(gh release view "$OLD_TAG" --json databaseId -q .databaseId 2>/dev/null || true)
6257 if [ -n "$RELEASE_ID" ]; then
6358 gh api -X PATCH "repos/${{ github.repository }}/releases/${RELEASE_ID}" \
6459 -f tag_name="$NEW_TAG" \
6560 -f name="$NEW_TAG"
6661 fi
62+
63+ # Retag
64+ git tag "$NEW_TAG" "$OLD_TAG" 2>/dev/null || true
65+ git tag -d "$OLD_TAG" 2>/dev/null || true
66+ git push origin "$NEW_TAG" ":refs/tags/$OLD_TAG" 2>/dev/null || true
You can’t perform that action at this time.
0 commit comments