ci(nexus): add --repo flag to gh release download#2256
Conversation
prepare-artifacts has no checkout step, so gh has no .git directory to infer the repository from. Without --repo, gh falls back to git which fails with 'fatal: not a git repository'. Pass GITHUB_REPOSITORY explicitly so the download works on a bare runner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe CI upload workflow now resolves a GitHub release by tag, filters planned Nexus uploads to assets present in that release, downloads release assets from the correct repo, adds a dry-run Nexus-versions check, enables existing-version checks for the uploader, and replaces the shell summary with a Python-rendered per-feature report. The feature audit tool now prioritizes INI-derived artifact patterns using mod_filename. ChangesNexus upload + release-driven matrix
Artifact pattern derivation (feature audit tool)
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Release as GitHub Release
participant Matrix as Matrix Builder
participant Nexus as Nexus API
participant Upload as upload-to-nexus
participant Summary as Python Summary
GH->>Release: GET repos/.../releases/tags/$RELEASE_TAG
Release-->>GH: release.body + assets[]
GH->>Matrix: build upload matrix, inject core changelog, filter by artifact_in_release
GH->>Nexus: check-nexus-versions dry-run queries per planned feature (UNEX_APIKEY)
Nexus-->>GH: existing/recent versions or auth/error
GH->>Upload: invoke upload-to-nexus (check_existing: true, changelog precedence)
Upload->>Nexus: check existing versions, upload artifacts
Upload-->>GH: upload results
GH->>Summary: run Python report (needs.upload-to-nexus.result + upload_matrix)
Summary-->>GH: append per-feature markdown to step summary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 actionlint (1.7.12).github/workflows/build.yamlcould not read ".github/workflows/build.yaml": open .github/workflows/build.yaml: no such file or directory .github/workflows/upload-nexus.yamlcould not read ".github/workflows/upload-nexus.yaml": open .github/workflows/upload-nexus.yaml: no such file or directory 🔧 YAMLlint (1.38.0).github/workflows/upload-nexus.yaml[Errno 2] No such file or directory: '.github/workflows/upload-nexus.yaml' .github/workflows/build.yaml[Errno 2] No such file or directory: '.github/workflows/build.yaml' 🔧 Checkov (3.2.525).github/workflows/build.yaml2026-05-02 04:18:17,004 [MainThread ] [ERROR] Template file not found: .github/workflows/build.yaml ... [truncated 9063 characters] ... anning: could not process file .github/workflows/build.yaml .github/workflows/upload-nexus.yaml2026-05-02 04:18:17,000 [MainThread ] [ERROR] Template file not found: .github/workflows/upload-nexus.yaml ... [truncated 9182 characters] ... or directory: '.github/workflows/upload-nexus.yaml' Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
Derive artifact_pattern from mod_filename using cmake's space→dot convention (e.g. "Cloud Shadows" → Cloud.Shadows-*.7z) so patterns match actual release assets. Previously used the CamelCase folder name which never matched. Also filter upload_matrix to only include rows whose artifact actually exists in the GitHub release, preventing hard failures in upload-to-nexus when a feature's standalone package was not included in the release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add check-nexus-versions job that runs during dry runs: queries the Nexus API for each planned upload and reports whether the version already exists on Nexus, validating UNEX_APIKEY in the process. Add check_existing: true to upload-to-nexus so re-runs after partial failures automatically skip already-uploaded versions via the Nexus files API. Replace the upload-summary failure branch with a per-feature table listing each mod's Nexus link, planned version, and workflow artifact name for manual recovery. Success branch also lists per-feature links instead of hardcoding the core mod only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/upload-nexus.yaml:
- Around line 176-196: Resolve the release by tag (not by the first-page
releases.json) and require the asset check for core too: replace the current
releases.json-based lookup with a tag-specific release fetch (use the GH API
repos/:owner/:repo/releases/tags/:tag or ensure releases.json contains the tag
response) so that release is populated from RELEASE_TAG, compute asset_names
from that resolved release, and change artifact_in_release (and the upload_data
filter) to stop hardcoding True for 'core'—have it apply the same
artifact_pattern/asset_name matching for all rows so uploads are only allowed
when the matching artifact actually exists.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: efb92c5a-b726-408c-9979-bcb9684eb5ee
📒 Files selected for processing (1)
.github/workflows/upload-nexus.yaml
Use /releases/tags/:tag endpoint instead of /releases list to avoid pagination issues when there are 30+ releases. Remove hardcoded True for core in artifact_in_release so all rows including core are validated against actual release assets. Addresses CodeRabbit review comment. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.github/workflows/upload-nexus.yaml (1)
148-151:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFail the workflow when the tag lookup fails, and make this the single source of truth.
Because Line 101 still checks publication state via the paginated
repos/.../releaseslist, older published tags can still be rejected before this block runs. On top of that, this new fallback turns anygh apifailure into{}, so Lines 158 and 182 quietly produce an empty changelog/asset list andhas_uploads=falseinstead of surfacing the real error. Fetch the tag once, fail on error, and readdraft,body, andassetsfrom that same response.Suggested fix
- # Fetch the specific release by tag — avoids pagination issues with - # the releases list endpoint (default page size is 30). - gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" \ - 2>/dev/null > release.json || echo '{}' > release.json + # Fetch the specific release by tag and use it for all release metadata checks. + gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" \ + > release.json || { + echo "ERROR: failed to resolve release metadata for $RELEASE_TAG" >&2 + exit 1 + }Then replace the earlier paginated draft check with fields from
release.jsonso the workflow does not depend on two different release lookups.GitHub REST API docs: does GET /repos/{owner}/{repo}/releases paginate by default, and does GET /repos/{owner}/{repo}/releases/tags/{tag} return the specific release payload including draft/prerelease/body/assets?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/upload-nexus.yaml around lines 148 - 151, The gh api call that writes release.json should fail the job instead of falling back to '{}' and you should use that single JSON response as the source of truth; replace the current line `gh api "repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" 2>/dev/null > release.json || echo '{}' > release.json` with a strict command that exits on non‑zero (or capture stderr and exit if empty), then parse draft, body and assets from release.json to set has_uploads/published checks; also remove or replace the earlier paginated `repos/.../releases` lookup and its draft check so all logic (draft/prerelease/publication, changelog/body, and assets list) reads from release.json (using RELEASE_TAG, release.json, has_uploads and the gh api call as anchors).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/upload-nexus.yaml:
- Around line 148-151: The gh api call that writes release.json should fail the
job instead of falling back to '{}' and you should use that single JSON response
as the source of truth; replace the current line `gh api
"repos/$GITHUB_REPOSITORY/releases/tags/$RELEASE_TAG" 2>/dev/null > release.json
|| echo '{}' > release.json` with a strict command that exits on non‑zero (or
capture stderr and exit if empty), then parse draft, body and assets from
release.json to set has_uploads/published checks; also remove or replace the
earlier paginated `repos/.../releases` lookup and its draft check so all logic
(draft/prerelease/publication, changelog/body, and assets list) reads from
release.json (using RELEASE_TAG, release.json, has_uploads and the gh api call
as anchors).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 112d0aae-dc1b-4c1e-bc4f-b981df6bb301
📒 Files selected for processing (1)
.github/workflows/upload-nexus.yaml
build.yaml: run-vs2022 should be false only for tag builds, not all non-dispatch events. Change expression to github.ref_type != 'tag'. upload-nexus.yaml: manual changelog input should override auto-generated feature changelog. Swap precedence to inputs.changelog || matrix.changelog. feature_version_audit.py: feature_dir was constructed as FEATURES_DIR/name (CamelCase) which does not exist for multi-word features like Screen Space GI. Use find_feature_dir() fuzzy resolver with fallback. feature_version_audit.py: --pretty=%s only returns commit subjects, missing BREAKING CHANGE footers in commit bodies. Switch to %s\x1f%b\x1f separator format (ASCII unit-separator; null bytes are rejected by Windows subprocess) so RE_COMMIT_BREAKING can match footers while subjects remain the display text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2256) Adapted from PR community-shaders#2256 onto this branch's Nexus upload workflow.
…2256) Adapted from PR community-shaders#2256 onto this branch's Nexus upload workflow.
Summary
prepare-artifactshas no checkout step, so there is no.gitdirectory on the runner. Without--repo,gh release downloadfalls back to inferring the repository from git, which fails with:Fix: pass
--repo "$GITHUB_REPOSITORY"explicitly so the download works on a bare runner.Observed in run 25238941523 — all 13
prepare-artifactsmatrix jobs failed at the download step.Test plan
prepare-artifactsjobs download assets successfully🤖 Generated with Claude Code
Summary by CodeRabbit