fix(release ci): fix paths for downloaded artifacts - #609
Conversation
📝 WalkthroughWalkthroughThe release workflow now renames Linux build outputs with platform suffixes, merges downloaded artifacts in the release job, generates completions from the suffixed amd64 binaries, and enumerates release assets with ChangesCI Workflow Update
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
249-268: 🗄️ Data Integrity & Integration | 🔴 Critical | 🏗️ Heavy lift
merge-multiple: truewill flatten the downloads and break the release job. The files inside each artifact are still namedmip,minimal, andminimald, so amd64/arm64 copies overwrite each other inartifacts/. The laterchmod +x artifacts/*-*-*and completion commands still look for platform-suffixed paths, so this step will fail unless the binaries are renamed before upload or the download keeps separate subdirectories.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 249 - 268, The Download artifacts step in the ci workflow is flattening files because merge-multiple is enabled, which breaks the later chmod and completion generation that expect platform-suffixed binaries. Update the artifact handling so the binaries remain in separate subdirectories or are renamed with unique platform names before upload, and make sure the Generate completions commands in the workflow reference the actual downloaded paths for mip, minimal, and minimald.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 249-268: The Download artifacts step in the ci workflow is
flattening files because merge-multiple is enabled, which breaks the later chmod
and completion generation that expect platform-suffixed binaries. Update the
artifact handling so the binaries remain in separate subdirectories or are
renamed with unique platform names before upload, and make sure the Generate
completions commands in the workflow reference the actual downloaded paths for
mip, minimal, and minimald.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 696dae77-ce13-4435-ad9f-ef1884665f14
📒 Files selected for processing (1)
.github/workflows/ci.yml
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
249-268: 🗄️ Data Integrity & Integration | 🔴 Critical | 🏗️ Heavy lift
merge-multiple: trueclobbers same-named binaries here.
Artifacts uploadmip/minimal/minimaldunder different artifact names, so downloading them into one directory keeps only one copy of each basename and drops the arch-specific suffix. That breaksartifacts/*-*-*andartifacts/mip-linux-amd64/minimal-linux-*references, and the release assets can end up with the wrong architecture. Rename the files before upload or download each artifact into its own directory.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 249 - 268, The artifact download step is merging multiple uploads into one directory, which causes same-named binaries to overwrite each other and breaks the later references in the completion-generation step. Update the workflow around the Download artifacts and Generate completions steps so each artifact is kept in its own directory or is renamed before download/upload, and ensure the completion commands reference the correct unique binary paths from the intended artifact names.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
273-278: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winStatic analysis flags potential template injection via unquoted
${{ }}expansion inrun:.zizmor flags this block for expanding
${{ steps.release_info.outputs.tag }}/${{ steps.release_info.outputs.name }}directly into the shell script rather than via anenv:var. These values are derived fromgit rev-parse --short=8 HEAD, so practical exploitability is low here, but the general pattern is unsafe if the source of these outputs ever changes to include less-trusted input.🛡️ Suggested hardening: pass values via env instead of inline expansion
- name: Create Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_TAG: ${{ steps.release_info.outputs.tag }} + RELEASE_NAME: ${{ steps.release_info.outputs.name }} run: | tar -C artifacts/completions -czf artifacts/completions.tar.gz . cd artifacts/ - gh release create "${{ steps.release_info.outputs.tag }}" \ + gh release create "$RELEASE_TAG" \ $(find . -maxdepth 1 -type f) \ --repo="${GITHUB_REPOSITORY}" \ - --title="${{ steps.release_info.outputs.name }}" + --title="$RELEASE_NAME"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 273 - 278, The release creation step in the CI workflow is expanding `${{ steps.release_info.outputs.tag }}` and `${{ steps.release_info.outputs.name }}` directly inside the `run:` shell script, which triggers template-injection hardening warnings. Update the release job to pass these values through `env:` in the same workflow step, then reference the environment variables in the `gh release create` command instead of inline `${{ }}` expansion; use the release-info step outputs as the source and keep the existing `gh release create` block intact.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 249-268: The artifact download step is merging multiple uploads
into one directory, which causes same-named binaries to overwrite each other and
breaks the later references in the completion-generation step. Update the
workflow around the Download artifacts and Generate completions steps so each
artifact is kept in its own directory or is renamed before download/upload, and
ensure the completion commands reference the correct unique binary paths from
the intended artifact names.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 273-278: The release creation step in the CI workflow is expanding
`${{ steps.release_info.outputs.tag }}` and `${{ steps.release_info.outputs.name
}}` directly inside the `run:` shell script, which triggers template-injection
hardening warnings. Update the release job to pass these values through `env:`
in the same workflow step, then reference the environment variables in the `gh
release create` command instead of inline `${{ }}` expansion; use the
release-info step outputs as the source and keep the existing `gh release
create` block intact.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: aae42e57-8fd6-405a-ba12-eb76eed03a4b
📒 Files selected for processing (1)
.github/workflows/ci.yml
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
300-309: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPass release tag/name via
envinstead of inline${{ }}in the run script.The asset enumeration logic is correct. Separately,
${{ steps.release_info.outputs.tag }}/.nameare interpolated directly into the shell script (flagged by zizmor at Lines 306, 309). The values are SHA-derived so real risk is low here, but binding them toenvand referencing shell variables avoids the template-injection class entirely and clears the SAST finding.🔒 Proposed hardening
- name: Create Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RELEASE_TAG: ${{ steps.release_info.outputs.tag }} + RELEASE_NAME: ${{ steps.release_info.outputs.name }} run: | tar -C artifacts/completions -czf artifacts/completions.tar.gz . cd artifacts/ - gh release create "${{ steps.release_info.outputs.tag }}" \ + gh release create "$RELEASE_TAG" \ $(find . -maxdepth 1 -type f) \ --repo="${GITHUB_REPOSITORY}" \ - --title="${{ steps.release_info.outputs.name }}" + --title="$RELEASE_NAME"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 300 - 309, The Create Release workflow step is interpolating the release tag and title directly inside the shell script, so move the release tag/name from steps.release_info.outputs.tag and steps.release_info.outputs.name into env values on the Create Release step and reference those shell variables in the gh release create command instead. Keep the existing tar/find asset logic unchanged, and use the Create Release step plus gh release create invocation as the place to apply the env-based substitution.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 300-309: The Create Release workflow step is interpolating the
release tag and title directly inside the shell script, so move the release
tag/name from steps.release_info.outputs.tag and steps.release_info.outputs.name
into env values on the Create Release step and reference those shell variables
in the gh release create command instead. Keep the existing tar/find asset logic
unchanged, and use the Create Release step plus gh release create invocation as
the place to apply the env-based substitution.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: eb6890e6-bbd2-4f87-878b-b759d702ecaf
📒 Files selected for processing (1)
.github/workflows/ci.yml
Fixes:
merge-multiplemakes it stamp out the artifacts all in the same dir, rather than extracting each matched artifact into its own directory.Summary by CodeRabbit