From 2264707ae608c6f25e05f0a3d199864a92e203d9 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 13 Jun 2026 06:06:00 -0300 Subject: [PATCH 1/2] Link release notes to resolvable upstream tag and PR commits --- .github/workflows/unsloth-prebuilt.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unsloth-prebuilt.yml b/.github/workflows/unsloth-prebuilt.yml index 8aa7cf2eb519..ecd3b0f3b24e 100644 --- a/.github/workflows/unsloth-prebuilt.yml +++ b/.github/workflows/unsloth-prebuilt.yml @@ -498,8 +498,19 @@ jobs: TAG='${{ needs.resolve.outputs.tag }}' REPO="$GITHUB_REPOSITORY" PRS='${{ needs.resolve.outputs.prs }}' - SRC="upstream ${{ needs.resolve.outputs.base }}" - [ "$(jq length <<<"$PRS")" = 0 ] || SRC="$SRC + $(jq -r 'map("PR #\(.number) @ \(.sha[0:7])") | join(", ")' <<<"$PRS")" + BASE='${{ needs.resolve.outputs.base }}' + # Link the base to the upstream release tag (always resolves). The PR + # links use each pin's own commit-in-PR URL, so they point at the exact + # SHA that was merged. We deliberately do not link the merged commit: + # in mix mode it is a throwaway merge made on the runner and never + # pushed anywhere, so any repo@sha URL for it 404s. + NOTES="Automated Unsloth llama.cpp CUDA (Linux + Windows) + ROCm + macOS prebuild for upstream [${BASE}](https://github.com/ggml-org/llama.cpp/releases/tag/${BASE})" + if [ "$(jq length <<<"$PRS")" = 0 ]; then + NOTES="${NOTES}." + else + PR_LIST="$(jq -r 'map("- [PR #\(.number) @ \(.sha[0:7])](\(.url))") | join("\n")' <<<"$PRS")" + NOTES="$(printf '%s, merged with:\n\n%s' "$NOTES" "$PR_LIST")" + fi # Atomic publish: upload as draft (hidden from the anon GitHub API # the installer uses), then flip draft=false only once every asset @@ -510,6 +521,6 @@ jobs: fi gh release create "$TAG" --repo "$REPO" --draft \ --title "llama.cpp prebuilt $TAG" \ - --notes "Automated Unsloth llama.cpp CUDA (Linux + Windows) + ROCm + macOS prebuild for $SRC (${{ needs.resolve.outputs.repo }}@${{ needs.resolve.outputs.commit }})." \ + --notes "$NOTES" \ dist/* gh release edit "$TAG" --repo "$REPO" --draft=false From ab6607fe71acfe161df9d064b0b4f124905f62e4 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 13 Jun 2026 15:45:03 -0300 Subject: [PATCH 2/2] Render PRs as upstream references with linked commits in release notes --- .github/workflows/unsloth-prebuilt.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unsloth-prebuilt.yml b/.github/workflows/unsloth-prebuilt.yml index ecd3b0f3b24e..512363ae9895 100644 --- a/.github/workflows/unsloth-prebuilt.yml +++ b/.github/workflows/unsloth-prebuilt.yml @@ -499,16 +499,19 @@ jobs: REPO="$GITHUB_REPOSITORY" PRS='${{ needs.resolve.outputs.prs }}' BASE='${{ needs.resolve.outputs.base }}' - # Link the base to the upstream release tag (always resolves). The PR - # links use each pin's own commit-in-PR URL, so they point at the exact - # SHA that was merged. We deliberately do not link the merged commit: - # in mix mode it is a throwaway merge made on the runner and never - # pushed anywhere, so any repo@sha URL for it 404s. + # Link the base to the upstream release tag (always resolves). Each PR + # is a bare ggml-org/llama.cpp# reference, which GitHub renders as a + # link to the upstream PR (shown inline as ggml-org#, title/state on + # hover) that resolves to upstream no matter which repo hosts the + # release; the short SHA links to that pin's commit-in-PR URL. We + # deliberately do not link the merged commit: in mix mode it is a + # throwaway merge made on the runner and never pushed anywhere, so any + # repo@sha URL for it 404s. NOTES="Automated Unsloth llama.cpp CUDA (Linux + Windows) + ROCm + macOS prebuild for upstream [${BASE}](https://github.com/ggml-org/llama.cpp/releases/tag/${BASE})" if [ "$(jq length <<<"$PRS")" = 0 ]; then NOTES="${NOTES}." else - PR_LIST="$(jq -r 'map("- [PR #\(.number) @ \(.sha[0:7])](\(.url))") | join("\n")' <<<"$PRS")" + PR_LIST="$(jq -r 'map("- ggml-org/llama.cpp#\(.number) @ [\(.sha[0:7])](\(.url))") | join("\n")' <<<"$PRS")" NOTES="$(printf '%s, merged with:\n\n%s' "$NOTES" "$PR_LIST")" fi