fix(release): set GH_REPO so upload-release-assets can find the repo - #48
Conversation
The v0.1.2 run built all 6 targets (zigbuild musl included) but
upload-release-assets failed: 'gh release upload' ran 'fatal: not a git
repository' because that job downloads artifacts without checking out the
repo, so gh had no local .git to infer the target from. publish-npm and the
Homebrew job then failed downstream because no assets reached the release
(the resilience always() correctly let them run and fail loudly).
Set GH_REPO=${{ github.repository }} so gh resolves the repo without a
checkout — mirrors how publish-npm already passes --repo to gh release download.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesRelease Workflow: Explicit GH_REPO for upload-release-assets
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Up to standards ✅🟢 Issues
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Problem
The v0.1.2 release run built all 6 targets successfully (including the musl target via cargo-zigbuild — the prior blocker is fixed 🎉), but
upload-release-assetsfailed:This job downloads the build artifacts but never checks out the repo, so
ghhad no local.gitto infer the target repository from.publish-npmandupdate-homebrew-formulathen failed downstream — no assets reached the release, so the npm generator and the Homebrew checksum download had nothing to fetch (the resiliencealways()correctly let them run and fail loudly rather than silently skip).This was latent:
upload-release-assetshad never actually run before (v0.1.0/v0.1.1 failed earlier in the matrix), so this is the first run to reach it.Fix
Set
GH_REPO: ${{ github.repository }}on the upload step.ghreadsGH_REPOas the default repo, so it resolves the target without a checkout — mirroring howpublish-npmalready passes--repo "$GITHUB_REPOSITORY"togh release download.Recovery
npm Trusted Publishing (OIDC) and the Homebrew app-token job can only run inside the workflow, and the v0.1.2 release/tag already exists (so release-please won't re-trigger it). Merging this
fix:cuts 0.1.3, which runs the full pipeline end-to-end with the upload fix. The empty v0.1.0/v0.1.1/v0.1.2 tags will be cleaned up after 0.1.3 publishes.Test plan
Summary by cubic
Set
GH_REPOto${{ github.repository }}in the release upload job sogh release uploadcan target the repo without a checkout. Fixes failed asset uploads and unblocks downstreampublish-npmand Homebrew updates.Written for commit cb062ee. Summary will update on new commits.
Summary by CodeRabbit