Skip to content

publish.yml: locate staged CLI binary with find (fixes 2.0 publish run)#363

Merged
willwashburn merged 1 commit intomainfrom
cli-artifact-find
May 7, 2026
Merged

publish.yml: locate staged CLI binary with find (fixes 2.0 publish run)#363
willwashburn merged 1 commit intomainfrom
cli-artifact-find

Conversation

@willwashburn
Copy link
Copy Markdown
Member

What

The 2.0 cutover publish run failed at the Stage prebuilt binaries into platform packages step: https://github.com/AgentWorkforce/burn/actions/runs/25503503514/job/74844319389

The hard-coded cli_src path expected upload-artifact@v4 to preserve the full directory hierarchy for single-file uploads (per a CodeRabbit web-search suggestion in #362 review). Empirically, it doesn't — the binary lands at the artifact root:

/tmp/cli-artifacts/relayburn-cli-darwin-arm64/burn   # actual
/tmp/cli-artifacts/relayburn-cli-darwin-arm64/packages/relayburn/npm/darwin-arm64/bin/burn   # what the script expected

Fix

Locate the binary with find rather than hard-coding either layout, mirroring the SDK leg's pattern for *.node. Survives future upload-artifact behavior changes.

State of the cutover release

The previous run did successfully:

  • Build all 8 binaries (4 CLI + 4 SDK) ✓
  • Bump versions to 2.0.0 across the 11 keepers ✓
  • Push the version-bump commit 3c1c080
  • Publish relayburn-sdk@2.0.0 and relayburn-cli@2.0.0 to crates.io ✓

It failed AFTER cargo publish but BEFORE npm publish, so:

  • crates.io: 2.0.0 is shipped (irrevocable)
  • npm: nothing was published

After this PR merges, re-trigger the workflow with version: none to skip the bump (already done) and re-run cargo publish (idempotent — version check skips if already published) and proceed to npm publish.

The CodeRabbit-suggested fix in #362 ("upload-artifact@v4 preserves
directory structure for single-file uploads") was based on outdated
docs. Empirical run https://github.com/AgentWorkforce/burn/actions/runs/25503503514
showed the binary actually lands at the artifact root
(/tmp/cli-artifacts/relayburn-cli-<short>/burn), not at the nested
packages/relayburn/npm/<short>/bin/burn path. The first publish run
hit the nested-path "if [ ! -f ]" guard and exited before staging.

Defensive: locate the binary with 'find -name burn -type f' rather
than hard-coding either layout, mirroring the SDK leg's pattern for
*.node. A future upload-artifact behavior change won't silently
break staging.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 88b4ae0a-efbf-40f4-afc8-1aef08b5cb41

📥 Commits

Reviewing files that changed from the base of the PR and between a4e6847 and bb78f0e.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

The publish workflow's "Stage prebuilt binaries into platform packages" step is updated to discover the burn CLI binary dynamically using find instead of assuming a fixed artifact directory structure, with added validation checks and error reporting for missing artifacts.

Changes

CLI Artifact Staging in Publish Workflow

Layer / File(s) Summary
Artifact Discovery Logic
.github/workflows/publish.yml
The workflow validates that the per-short CLI artifact directory exists, uses find to locate the burn binary instead of a hard-coded path, and copies it to packages/relayburn/npm/<short>/bin/burn.
Error Handling & Diagnostics
.github/workflows/publish.yml
Failure handling structure is preserved: if burn is not found, the workflow reports an error annotation and exits.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • AgentWorkforce/burn#362: Both PRs fix publish.yml's CLI artifact staging logic to handle the download and path resolution for the burn CLI binary.
  • AgentWorkforce/burn#360: PR #360 introduces the CLI build workflow that produces per-platform burn artifacts; this PR adapts the publish step to consume that new artifact layout.

Poem

🐰 A binary lost in directories deep,
Now found by find without a peep!
From flattened depths to packaged homes,
The burn CLI safely roams.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'publish.yml: locate staged CLI binary with find (fixes 2.0 publish run)' directly and accurately summarizes the main change: using find to locate the CLI binary instead of hardcoding paths, which fixes the failed 2.0 publish run.
Description check ✅ Passed The description is thorough and directly related to the changeset, explaining the problem (hardcoded path assumptions), the fix (using find), and the release state context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli-artifact-find

Comment @coderabbitai help to get the list of available commands and usage tips.

@willwashburn willwashburn merged commit 8527398 into main May 7, 2026
3 checks passed
@willwashburn willwashburn deleted the cli-artifact-find branch May 7, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant