Skip to content

ci(cli): add CI and crates.io publish pipeline for cougr-cli (#298) - #310

Merged
salazarsebas merged 2 commits into
salazarsebas:mainfrom
Empyrean-Code:ci/298-add-cli-workflows
Aug 31, 2026
Merged

ci(cli): add CI and crates.io publish pipeline for cougr-cli (#298)#310
salazarsebas merged 2 commits into
salazarsebas:mainfrom
Empyrean-Code:ci/298-add-cli-workflows

Conversation

@Empyrean-Code

Copy link
Copy Markdown
Contributor

Summary

  • Added .github/workflows/cli.yml to run fmt, clippy, test, and build specifically for the cougr-cli crate.
  • Added .github/workflows/publish-cli.yml to automatically publish cougr-cli to crates.io when version bumps are merged to main.
  • Both workflows are path-scoped to cli/** to avoid triggering on unrelated core or example changes.
  • Implemented the crates.io API pre-check to gracefully skip publishing if the version already exists, mirroring the existing cougr-core publish pipeline. GitHub Releases are intentionally omitted per the issue specifications (v1 ships via cargo install cougr-cli only).

Closes #298

Scope

  • Backend API behavior
  • Build/CI only
  • Docs only
  • Other

Validation

  • pnpm run build
  • pnpm test
  • pnpm lint
    (Note: Visual YAML verification completed locally to ensure syntax, path scoping, and working-directory execution contexts are valid).

Links

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@salazarsebas salazarsebas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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" — but publish-cli.yml stops after the publish job, with no tag/release step like publish-crate.yml's release: 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?
  2. Minor: publish-cli.yml:16 declares permissions: contents: write that's currently unused (nothing tags or releases). Either drop it or it'll be needed once (1) is resolved.
  3. 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.

Copy link
Copy Markdown
Owner

Addressed the review:

  1. Added a release job mirroring publish-crate.yml. Tags are cli-v{version} (title cougr-cli v{version}) so they do not collide with cougr-core's v{version} tags — both crates are currently 1.1.0.
  2. contents: write is now used by that job.
  3. Trailing newlines on both workflow files.

@salazarsebas salazarsebas left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salazarsebas
salazarsebas merged commit f48bd28 into salazarsebas:main Aug 31, 2026
1 check passed
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.

ci(cli): add CI and crates.io publish pipeline for cougr-cli

2 participants