Setup CLI GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffolds or updates the CI/CD and security pipeline of an agent-friendly command-line tool repository written in Rust,
Go, Swift or C#/.NET — the layouts produced by iru-setup-rust-cli, iru-setup-go-cli, iru-setup-swift-cli and
iru-setup-dotnet-cli.
Purpose
iru-setup-cli-github-workflows follows two rules. Everything that can run on Linux runs on ubuntu-latest (lint,
tests, coverage, the contract smoke test, docs, Sonar, CodeQL except Swift’s), and the macOS (~10x Linux minutes on a
private repository) and Windows (~1.7x) legs run the same tests only as often as cross-os-ci says, after the lint job
passes. And the binary is tested the way an agent uses it: every CI leg ends with a smoke test of the built executable
against the catalog’s CLI contract, and every release target is smoke-tested on its own runner before it is packaged.
It writes:
-
build.yml— runs on pushes to the integration/stable branches, pull requests andworkflow_dispatch. Lint and format with warnings as errors (rustfmt, Clippy, rustdoc and cargo-deny; golangci-lint v2, go vet and govulncheck; SwiftLint and swift format; dotnet format and analyzers), tests with an 80% coverage bar, reports for Sonar, and a contract smoke test of the built binary (--version/--helpexit 0, unknown command exits 2,greet --jsoncarriesschemaVersion: 1, the JSON error envelope with exit 3,schemais JSON, no ESC bytes withNO_COLORor without a TTY). A macOS and Windows test matrix is gated bycross-os-ci(allorstable; Swift has no Windows leg).ci-tests: fulladds the release-mode build and smoke test on every leg and any container-backed tests; Go adds a GoReleaser snapshot of every target. A docs job builds Antora, API docs (rustdoc,go doctext, DocC, DocFX) and the CLI reference regenerated from the command tree and diffed against the committed page, deployed to GitHub Pages or uploaded as an artifact. -
.github/scripts/cli_smoke_test.sh— the contract smoke test shared by every language. -
release.ymlperdistribution—internal: native per-target binaries on native runners packaged as flat<bin>-<version>-<target>.tar.gzor.ziparchives withSHA256SUMS, build-provenance attestations and a GitHub Release upload.store: additionally the package channels (crates.io, Homebrew, Scoop, WinGet, NuGet). Aworkflow_dispatchdry run publishes nothing. Plushomebrew_formula.pyfor the Homebrew channel andlcov_to_sonar_generic.pyfor Swift with Sonar. -
sync.ymlplus.github/scripts/sync_versions.py(gitflow only) — merges the release back into the integration branch and moves the version to the nextx.(y+1).0-dev. -
The shared security block —
security.yml(dependency-review, CodeQL, OSV-Scanner, gitleaks) and.github/dependabot.ymlforcargo,gomod,swiftornugetplusgithub-actions.
It announces whether it is creating the pipeline from scratch or updating one, and for each existing workflow, script or Dependabot file warns and asks Update, Keep as is, Replace or Stop, naming each concrete mismatch. It ends with the required-secrets table.
Plugin
Shipped by the iru-cli plugin of the ai-catalog marketplace (install with /plugin install iru-cli@ai-catalog; see Plugins).
Invocation
/iru-setup-cli-github-workflows
/iru-setup-cli-github-workflows <args>
args is a block of key: value lines, one per line. Standalone, the skill resolves visibility itself and asks the
remaining cost-sensitive choices with the Actions-minutes, SonarCloud and Pages cost facts for that visibility (never
ci — invoking it means CI is wanted).
Inputs
Other shared-vocabulary keys (ci, description, license, developer-*, organization-url, owner) are
accepted; description and license feed the Homebrew formula and the rest are ignored and named in the report.
Outputs
-
.github/workflows/build.ymland.github/scripts/cli_smoke_test.sh, always. -
.github/workflows/release.ymlunlessdistribution: none, with.github/scripts/homebrew_formula.pyfor the Homebrew channel (not Go) and.github/scripts/lcov_to_sonar_generic.pyfor Swift with Sonar. -
With a terminal UI (
ui: tui), aui-screenshotsartifact step inbuild.yml’s Linux test job that uploads the `.ui-screenshots/text captures written by the UI tests (see Building user interfaces). -
.github/workflows/sync.ymlwith.github/scripts/sync_versions.pyforbranching: gitflow. -
.github/workflows/security.ymland.github/dependabot.yml, always. -
A report with the mode, per-file action (created / updated / replaced / kept as is), adaptations for non-standard layouts, the choices made, what was left unverified locally, every open gap, the required-secrets table (
SONAR_TOKEN, tap/bucket/WinGet tokens, crates.io and NuGet credentials, Apple notarization secrets), repository settings to check, and the naming and install/verification facts foriru-setup-readme.
Execution flow
Dependencies
Invokes
None — this skill calls no other skill. It only mentions iru-setup-antora (recommended first, since the docs job fails
without an Antora site), the iru-setup-rust-cli, iru-setup-go-cli, iru-setup-swift-cli and iru-setup-dotnet-cli
scaffolds (whose layout contract the templates assume), iru-setup-windows-github-workflows and
iru-setup-macos-github-workflows (where a desktop app belongs; the latter’s lcov_to_sonar_generic.py is copied for
Swift), the bump-version skills whose x.(y+1).0-dev convention sync.yml follows, and iru-setup-readme (told the
workflow names and release asset names).
Invoked by
-
Setup CLI Repository — Step 7, CI/CD and security workflows, skipped when ci is no, via the
iru-isolated-skill-executoragent.
Related agents
-
iru-gate-runner— Step 5, runs the long local verification commands (lint, tests with the coverage bar, the smoke test on the debug binary, the host release build, GoReleaser snapshot, and the version sync script) and returns compact results.
Source
SKILL.md on GitHub — the file this page was generated from.