Skip to content

BUILD: Add CI checks and manual release workflow - #11

Merged
kishorereddy merged 2 commits into
mainfrom
fix/ci-cd
Aug 3, 2026
Merged

BUILD: Add CI checks and manual release workflow#11
kishorereddy merged 2 commits into
mainfrom
fix/ci-cd

Conversation

@kishorereddy

@kishorereddy kishorereddy commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Overview

Adding CI/CD / Build and Release Automation as preparation for a stable project.

  1. Adds real CI: every PR into main now runs lint and unit tests automatically.
  2. Adds a release workflow: builds, publishes to Maven Central, tags, and creates a GitHub release
  3. Fixes lint/test issues: found by turning these checks on for the first time, so the new CI starts green.

Ticket(s)

N/A

Link(s)

N/A

Example(s)

Cutting a release, once this is merged:

  1. Bump version: edit libraryVersion in kiit-codes/build.gradle.kts, merge to main.
  2. Run workflow: go to Actions tab, run "Release" manually (no inputs needed).
  3. Done: it publishes to Maven Central, tags the commit, and creates a GitHub release for you.

Dependencies

  1. Repo secrets: assumes KIIT_GPG_SECRET_KEY, KIIT_MAVEN_GPGNAME, KIIT_MAVEN_GPGPASS, KIIT_MAVEN_USER, KIIT_MAVEN_PSWD are already set in repo settings (not verified/created by this PR).

Design

  1. CI workflow (.github/workflows/ci.yml): runs on every PR into main, on ubuntu-latest.
  2. iOS tests skipped in CI: keeps PR checks fast and cheap; iOS still builds fine locally.
  3. Release workflow (.github/workflows/release.yml): manual trigger only, no auto-release on merge or tag push.
  4. Release order: Prevent duplicate tag, re-run tests, publish, then release. A failed publish never leaves a tag.
  5. Version handling: added a printVersion Gradle task so the release workflow reads the version
  6. Release notes: uses GitHub's built-in auto-generated notes, no extra tooling needed.

Notes

  1. Pre-existing issues found: turning on ktlintCheck/detekt surfaced style issues that were fixed.
  2. mac os : Runs on macos-latest, since publishing has to build the iOS targets, which need Xcode.
  3. CI/CD: Checks ktlint, detekt, JVM tests, and JS (Node) tests.

Pending

  1. iOS Tests and publishing.

Tests

  1. Ran exact command set both workflows use locally: ktlintCheck, detekt, jvmTest, jsNodeTest and all pass.
  2. Verified printVersion prints a clean version string with no extra output.
  3. Validated both workflow YAML files parse correctly.
  4. Release workflow itself can't be safely dry-run (it publishes for real) first live run should be reviewed

@kishorereddy
kishorereddy merged commit 17639b2 into main Aug 3, 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.

1 participant