1k app upgrade test

From OneKeyHQ/app-monorepo · View interactive version

1k app upgrade test is an AI agent skill from the GitHub repository OneKeyHQ/app-monorepo. Create test versions to verify app auto-update functionality and version migration.

How to use this skill

Skill file

Test Version Creation

Automates creation of test version branches with hardcoded build configurations for testing app upgrade functionality and version migration flows.

Quick Reference

Version Pattern

Test versions follow the pattern: 9XXX.YY.Z

Example: 9005.20.0 for testing production 5.20.0

Build Number Formula

Build number is calculated as:

DATE=$(date +%Y%m%d)
BUILD_NUMBER=$((${DATE}00 + 30))

Format: 10 digits = YYYYMMDD00 + 30

Example: If today is 20260130, build number is 2026013030

Workflow

Step 1: Get Version Information

Ask user for test version number:

Step 2: Calculate Build Number

DATE=$(date +%Y%m%d)
BUILD_NUMBER=$((${DATE}00 + 30))
echo "Build number: $BUILD_NUMBER"

Step 3: Create Branch

git checkout -b <test_version>
# Example: git checkout -b 9005.20.0

Step 4: Modify Configuration Files

Update these files in order:

  1. .env.version
  1. .github/actions/shared-env/action.yml
  1. .github/workflows/release-android.yml
  1. .github/workflows/release-ios.yml
  1. .github/workflows/daily-build.yml
  1. apps/mobile/android/app/build.gradle

Step 5: Commit and Push

git add .
git commit -m "chore: create test version <version>"
git push origin <test_version>

Files to Modify

| File | What to Update |

|------|----------------|

| .env.version | VERSION |

| .github/actions/shared-env/action.yml | Hardcode BUILD_NUMBER, remove conditionals |

| .github/workflows/release-android.yml | Hardcode BUILD_NUMBER in .env.version write |

| .github/workflows/release-ios.yml | Hardcode BUILD_NUMBER in .env.version write |

| .github/workflows/daily-build.yml | Hardcode BUILD_NUMBER in Setup ENV step |

| apps/mobile/android/app/build.gradle | versionCode, versionName |

Detailed Guide

For comprehensive test version creation workflow with examples, see upgrade-test-version.md.

Topics covered:

When to Use This Skill

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.