Files
opencode/command/release-android.md
voson 347d18192c feat: add release-android skill, command and script
- Add bin/release-android.mjs: Universal Android release script
  - Auto-detect Android project root (standalone or monorepo)
  - Auto-detect Gitea config from git remote URL (HTTPS/SSH)
  - Auto-detect Java Home from Android Studio
  - Support tag-based release workflow

- Add command/release-android.md: Command to trigger release process

- Add skill/release-android/SKILL.md: Skill documentation with full script source

- Update opencode.json: Enable thinking for claude models
2026-01-07 09:23:57 +08:00

1.6 KiB

description
description
Build and release Android APK to Gitea

Android Release Command

Build Android APK and upload to Gitea Release.

Prerequisites Check

First, verify the environment:

# Check GITEA_TOKEN
echo "GITEA_TOKEN: ${GITEA_TOKEN:+SET}"

# Check current directory for Android project
ls -la app/build.gradle.kts 2>/dev/null || ls -la android/app/build.gradle.kts 2>/dev/null || echo "No Android project found"

# Check current version
grep -h 'versionName' app/build.gradle.kts android/app/build.gradle.kts 2>/dev/null | head -1

# Check existing tags
git tag -l '*android*' -l 'v*' | tail -5

Release Process

If there are uncommitted changes:

  1. Increment version: update versionCode (+1) and versionName in app/build.gradle.kts
  2. Commit the changes with a descriptive message
  3. Create annotated git tag:
    • Monorepo: git tag -a android-{version} -m "Release notes"
    • Standalone: git tag -a v{version} -m "Release notes"
  4. Push commit and tag: git push && git push origin {tag}

If no uncommitted changes but tag doesn't exist:

  1. Create tag and push it

Build and Upload

After tag is created and pushed, run:

node ~/.config/opencode/bin/release-android.mjs

The script will:

  • Auto-detect Android project root (standalone or monorepo)
  • Auto-detect Gitea config from git remote URL (HTTPS/SSH)
  • Auto-detect Java from Android Studio
  • Build release APK
  • Upload to Gitea Release

Error Handling

  • If GITEA_TOKEN is not set: export GITEA_TOKEN="your_token"
  • If build fails: check Java/Android SDK installation
  • If tag not found: create and push the tag first

$ARGUMENTS