ci(cli): add CI and crates.io publish pipeline for cougr-cli (#298) - #310
Conversation
|
@Empyrean-Code Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
salazarsebas
left a comment
There was a problem hiding this comment.
Nice work mirroring core.yml/publish-crate.yml — path scoping to cli/**, the fmt/clippy(-D warnings)/test/build steps, and the rust-cache scoping are all correct. The crates.io pre-check is actually an improvement over the existing pattern (the || true guard so a brand-new crate's 404 doesn't hard-fail).
One thing needs resolving before merge:
- The GitHub Release step is missing. #298's Definition of Done says a version bump should result in "a successful crates.io publish and GitHub Release, mirroring
cougr-core's existing release behavior" — butpublish-cli.ymlstops after thepublishjob, with no tag/release step likepublish-crate.yml'srelease:job. The PR description says this is "intentionally omitted per the issue specifications," but the issue's out-of-scope section only excludes prebuilt binary artifacts, not the release entry itself. Can you either add the release job, or confirm with me that the DoD should be relaxed here? - Minor:
publish-cli.yml:16declarespermissions: contents: writethat's currently unused (nothing tags or releases). Either drop it or it'll be needed once (1) is resolved. - Nit: both new workflow files are missing a trailing newline at EOF.
Also flagging (not blocking): this deviates from the snake.yml/example_reusable.yml reusable-workflow pattern the issue names as the closest analog — inlining the steps directly works fine, just noting the divergence.
|
Addressed the review:
|
Summary
.github/workflows/cli.ymlto runfmt,clippy,test, andbuildspecifically for thecougr-clicrate..github/workflows/publish-cli.ymlto automatically publishcougr-clitocrates.iowhen version bumps are merged tomain.cli/**to avoid triggering on unrelated core or example changes.crates.ioAPI pre-check to gracefully skip publishing if the version already exists, mirroring the existingcougr-corepublish pipeline. GitHub Releases are intentionally omitted per the issue specifications (v1 ships viacargo install cougr-clionly).Closes #298
Scope
Validation
pnpm run buildpnpm testpnpm lint(Note: Visual YAML verification completed locally to ensure syntax, path scoping, and
working-directoryexecution contexts are valid).Links