ronjunevaldoz/kmp-agent-skills/kmp-release
Claude Code and agent skill by ronjunevaldoz/kmp-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
End-to-end KMP library and app release pipeline. Covers versioning strategy (gradle.properties as source of truth), Maven Central publishing via the vanniktech plugin, GPG signing, Sonatype Central Portal, changelog generation with git-cliff and Conventional Commits, GitHub Release creation, secrets management patterns, and — for app targets — deriving platform-native version fields (Android versionCode, iOS CFBundleVersion) from a single semver source. Distinct from the CI skill (which owns workflow YAML) and the xcframework-spm skill (which owns SPM binary distribution).
Install
npx vskill@latest install ronjunevaldoz/kmp-agent-skills/kmp-releaseSKILL.md
The same SKILL.md was published earlier as ronjunevaldoz/kmp-agent-skills/kmp-release.
When to Use This Skill
Use when you need to:
- Publish a KMP library to Maven Central for the first time
- Set up a repeatable versioning + changelog + release workflow
- Wire Maven credentials into CI without exposing them as plain text
- Generate a structured CHANGELOG.md from git history
- Create a GitHub Release with auto-generated release notes
- Decide between secrets management approaches (GitHub Secrets / Doppler / env vars)
- Cut a project release end to end, including version bump, tag, changelog, and GitHub Release
Trigger keywords: publish to Maven Central, Maven publish, release library, release project, cut release, ship version, versioning, semantic versioning, bump version, gradle.properties version, vanniktech, Sonatype, Central Portal, GPG signing, git-cliff, changelog, conventional commits, GitHub Release, release pipeline, publish KMP library, release workflow, secrets management publish, alpha release, beta release, release candidate, pre-release, snapshot, development version, GitHub Packages, promote to stable, version suffix.
Freshness rule: Sonatype Central Portal API and the vanniktech plugin change frequently — recheck the vanniktech plugin releases and Central Portal docs before scaffolding a new publish setup.
Does not own:
- GitHub Actions workflow YAML →
kmp-ci-github-actions - XCFramework build + SPM binary target →
kmp-xcframework-spm - App Store / Play Store submission → out of scope for this skill
Recommendation First
Default to: `gradle.properties` VERSION → vanniktech plugin → `ORG_GRADLE_PROJECT_*` env vars → git-cliff changelog → `gh release create`.
Why:
gradle.propertieskeeps version as a single editable line — no Gradle task, no plugin needed to bump itORG_GRADLE_PROJECT_*env vars are mapped automatically by Gradle — no-Pflags in scripts, no credential leaks- vanniktech's
com.vanniktech.maven.publishis the de-facto standard for KMP Central publishing - git-cliff + Conventional Commits turns commit history into a structured CHANGELOG automatically
gh release createwires the GitHub Release to the git tag in one command
Use a secrets manager (Doppler, 1Password, AWS Secrets Manager) only if your team already has one. GitHub Secrets is sufficient for most projects.
1. Versioning
Full content: references/1-versioning.md.
2. Maven Central Publishing
Full content: references/2-maven-central-publishing.md.
3. Changelog with git-cliff
cliff.toml (project root)
Commands
Install: brew install git-cliff
Requires Conventional Commits (feat:, fix:, refactor:, etc.) — enforce with the code-quality skill's commit-lint setup.
4. GitHub Release
--verify-tag ensures the tag exists before creating the release. Push the tag before running this:
For libraries that also ship an XCFramework: attach the .zip artifact to the release and update Package.swift. See kmp-xcframework-spm for the full SPM binary target workflow.
5. Local publish script
A reproducible local publish script eliminates "works on my machine" publish failures.
6. Release checklist
Before tagging:
- [ ] All tests pass locally (
./gradlew check) - [ ]
CHANGELOG.mdis up to date (git-cliff --tag vX.Y.Z --output CHANGELOG.md) - [ ]
VERSIONingradle.propertiesmatches the intended tag - [ ] No
-SNAPSHOTsuffix inVERSION - [ ] Maven credentials are available in the environment
- [ ] GPG key is loaded (
gpg --list-secret-keys)
After tagging:
- [ ] GitHub Release created with release notes
- [ ] Artifact visible on central.sonatype.com (allow ~10 min propagation)
- [ ] XCFramework zip attached to the release and
Package.swiftchecksum updated (if shipping SPM)
App target with an Android/iOS/store target (in addition to the checks above):
- [ ]
versionCode(Android) is derived from the semver source, not a literal integer — grep forversionCode\s*=\s*\d - [ ]
versionCodefor this build is strictly higher than the last accepted Play Console upload - [ ]
CFBundleVersion(iOS) is monotonic for thisCFBundleShortVersionString— not reused from a prior submission
Common Anti-Patterns
| Anti-pattern | Rule | |
|---|---|---|
Fallback version string in build.gradle.kts (?: "0.1.0") | Use error() — a missing VERSION should fail loudly | |
Publishing -SNAPSHOT or any pre-release suffix to Maven Central | Central rejects snapshots and pre-release suffixes; use GitHub Packages for alpha/beta/rc distribution | |
Credentials as -P flags (-PmavenCentralUsername=...) | Use ORG_GRADLE_PROJECT_* env vars — Gradle maps them automatically, no flags needed | |
| Version bump in CI | Version is a publisher decision; bump in gradle.properties before the CI publish job | |
Committing credentials to gradle.properties or .env | Always gitignore .env; store credentials in GitHub Secrets or a secrets manager | |
Skipping --no-configuration-cache | vanniktech plugin is incompatible with configuration cache; omitting this flag causes silent failures | |
Hardcoding Android versionCode (or any platform-native version field) as a static literal | Derive it from the single semver source (major * 1_000_000 + minor * 1_000 + patch) — a static value builds and runs fine locally but causes a hard Play Console rejection on the second upload | |
Deriving iOS CFBundleVersion purely from semver | Use a monotonic CI build number instead — CFBundleVersion must increase per build submitted for the same CFBundleShortVersionString, which pure semver derivation breaks on a re-submitted patch |
Testing the Release Pipeline
The release pipeline itself has no unit-testable Kotlin code — it is a build script and CI workflow. Test it by validating the inputs and outputs at each stage:
| What to verify | How | |
|---|---|---|
VERSION is read correctly | ./gradlew printVersion — add a task: tasks.register("printVersion") { doLast { println(project.findProperty("VERSION")) } } | |
| Publish runs without credentials | ./gradlew publishAllPublicationsToMavenCentralRepository --dry-run — confirms task graph without uploading | |
| git-cliff produces valid output | git-cliff --tag vX.Y.Z --unreleased --strip all — inspect the output before creating a release | |
ORG_GRADLE_PROJECT_* mapping works | Set vars locally and run ./gradlew publishToMavenLocal — verifies credential injection without hitting Central | |
| Changelog is up to date | git-cliff --output CHANGELOG.md && git diff CHANGELOG.md — should show only the new section |
Freshness rule: run ./gradlew publishToMavenLocal before every real publish to catch configuration drift early.
References
Full implementation content lives in references/*.md: 1-versioning, 2-maven-central-publishing. Load the specific file named in the pointer under its matching heading above, not all of them.
Related Skills
kmp-ci-github-actions— GitHub Actions workflow YAML that triggers the publish job on tag pushkmp-xcframework-spm— XCFramework build + SPM binary target; attach the zip to the GitHub Release created herekmp-code-quality— commit-lint enforcement for Conventional Commits (required for git-cliff)kmp-flavor-environment— dev/staging/prod config; keep release credentials separate from app config
Output Style
When setting up a release pipeline:
- Versioning — confirm
gradle.propertiesVERSION is the source of truth - Plugin — add vanniktech to version catalog + convention plugin
- Credentials — identify the secrets approach (GitHub Secrets / Doppler / other) and show the
ORG_GRADLE_PROJECT_*mapping - Changelog — scaffold
cliff.toml; confirm Conventional Commits are in use - Release script — generate
scripts/publish.shfor local use - CI integration — point to
kmp-ci-github-actionsfor the workflow YAML - Checklist — present the pre/post-release checklist
Never generate credentials or keys. If GPG setup is needed, give the commands the user runs themselves.
Changelog
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kmp-release/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ronjunevaldoz/kmp-agent-skills/kmp-release)