Setup KMP GitHub Workflows
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Scaffold or update the GitHub Actions CI/CD and security workflows, plus a Dependabot config, for a Kotlin
Multiplatform (Android + iOS) app repository produced by iru-setup-kmp-app.
Purpose
iru-setup-kmp-github-workflows combines the two sibling pipelines this catalog already has —
iru-setup-android-github-workflows (Gradle, Android Lint SARIF, signed bundle to Google Play / Firebase,
sync.yml) and iru-setup-swift-github-workflows (macOS runner choice, XcodeGen, xcodebuild, App Store Connect
API key to TestFlight, Swift CodeQL) — around one cost rule: the JVM/Android half runs on cheap Linux runners on
every change, while the iOS half needs macOS, whose minutes cost roughly 10x Linux on a private repository, so
when it runs is an explicit choice (ios-ci: all, stable or none).
build.yml has a Linux android job (detekt, ktlint, Android Lint with SARIF upload, JVM/Android host tests, root
Kover report and an 80% koverVerify, assembleDebug, optional ./gradlew sonar), a cost-gated macOS ios job
(Kotlin/Native iosSimulatorArm64Test, xcodegen generate, SwiftLint, and xcodebuild build or, with
ci-tests: full, xcodebuild test of the iosApp scheme on the newest iOS simulator) — each test job also uploads the UI tests'
.ui-screenshots/ captures as a 7-day ui-screenshots-android / ui-screenshots-ios artifact (if: always(),
no extra job or runner) — and an Antora + Dokka docs
job deployed to GitHub Pages (pages: yes) or uploaded as a workflow artifact (pages: no). release.yml depends
on distribution (internal: Firebase App Distribution + TestFlight; store: Google Play + TestFlight). sync.yml
with .github/scripts/sync_versions.py (gitflow only) merges the release back into the integration branch and bumps
VERSION_NAME to the next -SNAPSHOT. security.yml holds the shared security block (dependency-review, CodeQL
java-kotlin with a manual JVM build, optional CodeQL swift on macOS, OSV-Scanner, gitleaks), and Dependabot
covers gradle and github-actions.
The skill announces whether it is creating the pipeline from scratch or updating an existing one; for every
pre-existing workflow, script or Dependabot file it names each concrete mismatch with this run’s choices and asks
Update / Keep as is / Replace (Stop on the first question), unless on-existing decides. Standalone it resolves
visibility, sonar, ios-ci, ci-tests and pages with cost facts for that visibility; there is no ci key,
since invoking the skill means CI is wanted. Templates live in the skill’s reference/workflow-templates.md, and
action versions are looked up at run time with a recorded fallback table.
Plugin
Shipped by the iru-kmp plugin of the ai-catalog marketplace (install with /plugin install iru-kmp@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
No |
|
|
|
No |
Branch names, confirmed against |
|
|
No |
JDK for |
|
|
No |
macOS runner label and the Xcode version for |
|
|
No |
When the macOS |
Asked: |
|
No |
|
|
|
No |
|
|
|
No |
|
|
|
No |
Google Play track when |
|
|
No |
|
Detected or asked |
|
No |
Shared vocabulary. |
Detected or asked |
|
No |
|
|
|
No |
Gate one |
|
|
No |
Accepted and ignored; named in the report if supplied. |
None |
Outputs
| File | Written when |
|---|---|
|
Always (the test jobs include the UI screenshot artifact uploads; with |
|
|
|
|
|
Always (individual jobs gated by the |
|
Always (existing non-owned ecosystems are preserved) |
-
Each file is created when absent; when it existed, it is updated, replaced or kept as is per the user’s answer or
on-existing. Choosing Stop writes nothing. The report states the action per file and, for a kept file, each mismatch with this run’s choices. -
If
shared/build.gradle.ktsoriosApp/project.ymlis missing (for example a singlecomposeApp/layout or a committed.xcodeproj), the skill warns, asks whether to stop or continue, and lists every adaptation it made. -
Verification:
actionlint(or a Ruby YAML parse fallback) on every workflow,py_compileonsync_versions.py, and, when the scaffold is present, theandroidjob’s Gradle commands run throughiru-gate-runner. Anything needing GitHub’s runners or secrets is reported as unverified locally. -
A final report with the mode, per-file actions, wired or omitted features, the required-secrets table below, and repository settings to change.
Required secrets (only the rows that apply to what was generated):
| Secret | Purpose | Only needed when |
|---|---|---|
|
Sonar scan authentication |
|
|
Release keystore, decoded to |
|
|
Exported as |
|
|
Google Play service account for the upload action |
|
|
Firebase App Distribution upload |
|
|
App Store Connect API key: automatic signing, export and TestFlight upload |
|
|
Apple Developer Team ID (overrides |
|
|
|
Automatic |
Repository settings called out: "Workflow permissions" must allow Actions to create pull requests (gitflow
sync.yml); with pages: yes, Pages source must be GitHub Actions (and a Pro, Team or Enterprise Cloud plan for a
private repository); a Google Play app record and the App Store Connect bundle id must exist before the first
upload. TestFlight to App Store submission stays a manual step.
Execution flow
Dependencies
Invokes
None by skill call. In Step 5 it runs the android job’s Gradle commands locally through the
iru-gate-runner agent to confirm that task names and report paths referenced by
the workflows exist; it references iru-setup-kmp-app (task-name contract), iru-setup-antora,
iru-setup-android-github-workflows and iru-setup-swift-github-workflows only as conventions, never invoking
them.
Invoked by
-
Setup KMP Repository — Step 7 (skipped when
ci: no), via theiru-isolated-skill-executoragent, passingbranching, branches,java-version,ios-ci,ci-tests,runner,xcode-version,open-source,visibility,pages,distribution, the Sonar keys,modeandon-existingso nothing is asked twice.
It can also be run directly by a person to add or refresh the pipeline later.
Related agents
-
iru-gate-runner— runs the local Gradle verification of the task names the workflows reference (Step 5).
Source
SKILL.md on GitHub — the file this page was generated from.