Re-export toolhive-core schemas as release assets#4983
Closed
Re-export toolhive-core schemas as release assets#4983
Conversation
Reads the toolhive-core version from go.mod at release time, downloads the four JSON schema files from that version of stacklok/toolhive-core, and ships them alongside toolhive's own release assets. Motivation: downstream consumers (notably stacklok/docs-website) currently have to replicate this logic: read go.mod, derive the core version, then fetch from a different repo's release. Re-exporting the schemas here makes toolhive's release self-contained — one `gh release download` call gets everything. Paired with #4982 (CRD manifests as release asset); together these eliminate the need for docs-website to clone toolhive or hit a second repo during its release-doc regeneration. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4983 +/- ##
==========================================
- Coverage 69.63% 69.63% -0.01%
==========================================
Files 552 552
Lines 55951 55951
==========================================
- Hits 38962 38959 -3
- Misses 13991 13993 +2
- Partials 2998 2999 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Apr 21, 2026
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds four schema JSON files (from
stacklok/toolhive-coreat the go.mod-pinned version) as release assets on every toolhive release:toolhive-legacy-registry.schema.jsonupstream-registry.schema.jsonpublisher-provided.schema.jsonskill.schema.jsonMotivation
Downstream consumers that need these schemas — notably stacklok/docs-website — currently perform a two-repo dance:
github.com/stacklok/toolhive-core vX.Y.Zlinegh release downloadagainst a different repo (toolhive-core)Re-exporting the schemas here replaces that with a single
gh release downloadagainst toolhive's release. The source of truth (which schemas go with which toolhive version) is now explicit rather than derived.Paired with PR #4982 (CRD manifests as release asset). Together these two PRs eliminate all cross-repo and clone-based logic in docs-website PR #748, letting the docs regen pipeline work purely off
gh release download.What's in this PR
.github/workflows/releaser.yml: new "Download toolhive-core schemas at pinned version" step. Parsesgithub.com/stacklok/toolhive-corefromgo.mod, downloads the four schema files intobuild/..goreleaser.yaml: four newrelease.extra_filesentries so goreleaser uploads them.Test plan
Local smoke test (requires a toolhive-core release token for
gh release download):```
CORE_VERSION=$(grep 'github.com/stacklok/toolhive-core' go.mod | awk '{print $2}' | head -1)
mkdir -p /tmp/build
gh release download "$CORE_VERSION" --repo stacklok/toolhive-core \
--pattern "*.schema.json" --dir /tmp/build
ls /tmp/build
```
Notes
If toolhive ever switches to a release model where the binaries aren't compiled against a concrete
toolhive-coreversion (e.g., areplacedirective in go.mod for development), this step would need a fallback. Not a concern today — the go.mod always pins a concrete version at release tags.🤖 Generated with Claude Code