Ns deploy android app

From Melvynx/saveit.now · View interactive version

Ns deploy android app is an AI agent skill from the GitHub repository Melvynx/saveit.now. One-shot NowStack Mobile Android deployment with GPC Google Play Console CLI. Use when preparing Play Store releases, uploading AABs, syncing listings/screenshots, monitoring rollout health, or submitting Android without EAS Submit.

How to use this skill

Skill file

Deploy Android App - NowStack Mobile

<objective>

Ship NowStack Mobile to Google Play with GPC / Google Play Console CLI as the default Android deployment tool.

This skill does not use EAS Submit for Android uploads. The target flow is:

  1. Build or obtain a signed production .aab.
  2. Authenticate gpc with a Google Play service account.
  3. Run gpc preflight / gpc validate.
  4. Upload to the internal track with gpc publish or gpc releases upload.
  5. Monitor, promote, halt, or roll out with gpc status, gpc watch, and gpc releases promote.

Fastlane supply remains the stable fallback if gpc is blocked. Build artifact generation is OS-aware: macOS may use local Gradle or local EAS, while Windows/Linux must load ns-setup-expo and use EAS cloud to produce the .aab. Google Play automation belongs to gpc.

</objective>

<when_to_use>

Use this workflow when:

Do NOT use this for:

</when_to_use>

<state_variables>

Persist these values across the workflow:

| Variable | Type | Description |

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

| {app_name} | string | App name from SiteConfig.title / Expo config. |

| {slug} | string | Expo slug from SiteConfig.slug. |

| {package_name} | string | Android package name from SiteConfig.bundleId and android.package. |

| {aab_path} | string | Signed production .aab path to upload. |

| {convex_prod_url} | string | Production Convex cloud URL for EXPO_PUBLIC_CONVEX_URL. |

| {convex_prod_site_url} | string | Production Convex site URL for EXPO_PUBLIC_CONVEX_SITE_URL. |

| {google_play_track} | string | Initial target track: usually internal, then closed, open, or production. |

| {service_account_json_path} | string | Local path to Google Play service account JSON. Never commit. |

| {release_status} | string | Usually draft or completed, depending on the track/review plan. |

| {rollout_fraction} | number | Production staged rollout fraction, if promoting beyond testing. |

| {dry_run} | boolean | If true, print plans and run dry-run/validate-only commands only. |

</state_variables>

<critical_safety>

</critical_safety>

<preflight>

Run these checks from the repository root unless noted. Stop if deploy-relevant state is dirty or placeholders would ship.

gh repo view --json nameWithOwner,defaultBranchRef || true

git status --short --branch
node --version
npm --version
command -v gpc && gpc --version
gpc doctor || true
cd mobile-app && npx expo config --type public

Read and verify these files:

site-config.ts
mobile-app/app.config.ts
mobile-app/package.json
docs/templates/google-play-release.example.json
docs/templates/store-screenshot-manifest.example.json

Confirm:

</preflight>

<install_and_auth>

If gpc is missing, install it:

npm install -g @gpc-cli/cli

or:

brew install yasserstudio/tap/gpc

or standalone:

curl -fsSL https://raw.githubusercontent.com/yasserstudio/gpc/main/scripts/install.sh | sh

Authenticate:

gpc setup
gpc auth login --service-account "/secure/local/google-play-service-account.json"
gpc doctor

For CI, use env-based auth:

export GPC_SERVICE_ACCOUNT="/secure/local/google-play-service-account.json"
export GPC_APP="{package_name}"
gpc doctor --json

</install_and_auth>

<google_play_setup>

Use gpc as the Google Play control plane:

Manual gates that may still exist:

</google_play_setup>

<metadata_and_screenshot_automation>

Before binary publish or Play listing upload, run .agents/skills/ns-generate-store-screenshots and require its manifest to be upload-ready.

Automation target:

</metadata_and_screenshot_automation>

<build_aab>

This skill needs a signed production .aab. Detect the OS before choosing the build path:

uname -s || node -p "process.platform"

Local Expo/Gradle path:

cd mobile-app
npm run env:prod
npx expo prebuild --clean --platform android
cd android
./gradlew bundleRelease

Expected output path is usually:

mobile-app/android/app/build/outputs/bundle/release/app-release.aab

Stop if signing is not configured for release. Do not invent keystore credentials or write secrets into tracked Gradle files.

macOS local EAS path, when avoiding cloud credits but using EAS-managed signing:

cd mobile-app
npm run env:prod
npx eas-cli@latest build --platform android --profile production \
  --local --non-interactive --output /tmp/{slug}.aab

Windows/Linux required cloud path, and optional macOS fallback if the user explicitly allows EAS cloud for build artifact generation:

cd mobile-app
npm run env:prod
npx eas build --platform android --profile production --non-interactive

Do not use npx eas submit. Once the .aab exists, deployment continues with gpc.

</build_aab>

<gpc_publish_flow>

Before any mutation, run local/offline and server-side validation:

gpc preflight "{aab_path}" --fail-on error
gpc publish "{aab_path}" --track "{google_play_track}" --validate-only

If the command surface supports dry run in the installed version, run it before upload:

gpc releases upload "{aab_path}" --track "{google_play_track}" --dry-run

After validation passes and the user confirms:

gpc releases upload "{aab_path}" --track internal
gpc status

or use the high-level publish flow:

gpc publish "{aab_path}" --track internal --notes "Initial internal test release"
gpc status

After internal validation, promote deliberately:

gpc releases promote --from internal --to closed
gpc releases promote --from closed --to production --rollout 10
gpc watch --track production --on-breach halt

</gpc_publish_flow>

<fallback_fastlane_supply>

Use fastlane supply only if GPC is unavailable or blocked.

Install/setup:

bundle add fastlane
bundle exec fastlane supply init
bundle exec fastlane run validate_play_store_json_key json_key:"/secure/local/google-play-service-account.json"

Validate/upload:

bundle exec fastlane supply \
  --aab "{aab_path}" \
  --track internal \
  --json_key "/secure/local/google-play-service-account.json" \
  --validate_only true

bundle exec fastlane supply \
  --aab "{aab_path}" \
  --track internal \
  --json_key "/secure/local/google-play-service-account.json"

</fallback_fastlane_supply>

<post_submit_checklist>

After gpc publish or gpc releases upload succeeds:

cd mobile-app
npm run env:dev

</post_submit_checklist>

<failure_modes>

</failure_modes>

<success_metrics>

</success_metrics>

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.