CI/CD Pipeline

Workflow: release.yml

File: .github/workflows/release.yml

Trigger: PR merged to main or manual workflow_dispatch.

Runner: Blacksmith (4vCPU Ubuntu 2404)

Steps

  1. Checkout (fetch-depth: 0 for tags)
  2. Setup JDK 17 + Gradle
  3. Decode keystore from secrets (base64)
  4. Create keystore.properties, secrets.properties, google-services.json from secrets
  5. Check for existing draft release (reuse if found)
  6. Version bump: Read versionName from app/build.gradle.kts, patch increment (X.Y.Z → X.Y.(Z+1)), write back, commit, tag v1.X.Y
  7. AI release notes: Collect commits since previous tag, call OpenCode with commit history to generate notes, split into full (GitHub) and ≤500 char (Play Store) versions
  8. Build: assembleGithubRelease + bundlePlaystoreRelease
  9. Upload AAB to Play Store (alpha track, status: completed)
  10. Upload APK to GitHub Release (draft, reuse or create)

Secrets required

SecretPurpose
KEYSTORE_FILE_BASE64Release keystore (base64 encoded)
KEYSTORE_PASSWORDKeystore password
KEY_ALIASKey alias
KEY_PASSWORDKey password
GOOGLE_CLIENT_IDOAuth web client ID
PUSH_BACKEND_URLCloudflare Workers push relay URL
GOOGLE_SERVICES_JSONFirebase google-services.json (base64)
SERVICE_ACCOUNT_JSONPlay Console service account for upload
GITHUB_TOKENAuto-provided, used for GitHub release

Release Process

How a release happens

  1. A PR is merged to main (or workflow_dispatch is triggered).
  2. CI runs release.yml.
  3. Version is bumped automatically (patch increment), committed and tagged.
  4. APK and AAB are built.
  5. AAB is uploaded to Play Console alpha track.
  6. APK is uploaded to a draft GitHub Release.
  7. Release notes are generated by AI from commit messages.

Post-release manual steps

  1. Go to GitHub Releases.
  2. Find the new draft release.
  3. Review and edit release notes if needed.
  4. Publish the release.

What if a release fails mid-way?

  1. Fix the issue.
  2. Push a fix to main.
  3. Either merge another PR (triggers a new release) or run workflow_dispatch.
  4. The workflow checks for existing draft releases and reuses them if found.

Version numbering

← Testing Style Guide →