Files
opencode-mobile/.github/workflows/publish-play-store.yml
Den 14e858a402 ci(play): production track input + launch kit + F-Droid metadata fix (#19)
* ci(play): add track/status inputs to publish workflow

Lets the Play publish run target a public track (production/beta) and
choose draft vs completed, instead of being hard-wired to internal.
Defaults stay internal/completed so tag-push and release triggers are
unchanged. Enables promoting the app to a publicly-downloadable track —
the prerequisite for any real download growth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(play): record user authorization for production go-live

* docs(fdroid): correct metadata to cc.agentlabs.opencode + agentlabs.cc, flag post-rename tag gate

The fdroiddata submission still referenced the old package ai.opencode.mobile
and v0.3.1. Update package id, website, and document the real blocker: F-Droid
mainline needs a release tag built AFTER the package rename (v0.4.1 APK is the
old id) plus Play production live and a reproducible build. Signing fingerprint
is unchanged across the rename.

* docs(launch): ready-to-fire distribution kit (Show HN, Reddit, PH, X, dev.to)

Copy-paste launch posts + ordered fire checklist so distribution starts the
moment the public listing is live. Store URLs left as {{PLAY_URL}}/{{FDROID_URL}}
placeholders; web hub agentlabs.cc/opencode is live now.

---------

Co-authored-by: engineer <engineer@opencode.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 15:32:19 -07:00

124 lines
4.4 KiB
YAML

name: Publish to Google Play Store
on:
release:
types: [published]
push:
tags: ["v*"]
workflow_dispatch:
inputs:
track:
description: "Play track to release to"
required: false
default: "internal"
type: choice
options:
- internal
- alpha
- beta
- production
status:
description: "Release status (draft = uploads without going live/review; completed = submit)"
required: false
default: "completed"
type: choice
options:
- completed
- draft
jobs:
publish:
runs-on: ubuntu-latest
env:
EXPO_PUBLIC_SENTRY_DSN: ${{ secrets.EXPO_PUBLIC_SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: npm
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v4
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
android/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('android/**/*.gradle*', 'android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Android build outputs
uses: actions/cache@v5
with:
path: |
android/app/build/intermediates
android/build
android/app/.cxx
key: ${{ runner.os }}-android-build-${{ hashFiles('package-lock.json', 'android/**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-android-build-
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Bump android.versionCode in app.json
# Play Store rejects duplicate versionCodes, so derive a monotonic value
# from github.run_number. expo prebuild reads this into build.gradle.
run: |
node -e "const f='app.json';const j=require('./'+f);j.expo.android=j.expo.android||{};j.expo.android.versionCode=${{ github.run_number }};require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'\n')"
echo "versionCode now: $(node -p "require('./app.json').expo.android.versionCode")"
- name: Purge stale generated sources
# The Android build cache (restore-keys prefix fallback) can restore a
# generated autolinking tree from a previous package id. Gradle then
# reuses ReactNativeApplicationEntryPoint.java referencing the OLD
# package (ai.opencode.mobile.BuildConfig) and compileReleaseJavaWithJavac
# fails. Delete generated sources so prebuild + Gradle regenerate them
# for the current package (cc.agentlabs.opencode).
run: rm -rf android/app/build/generated android/build/generated android/app/build/intermediates
- name: Expo prebuild
run: npx expo prebuild --platform android --no-install
- name: Decode keystore
run: echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/release.keystore
- name: Build AAB
working-directory: android
env:
RELEASE_STORE_FILE: release.keystore
RELEASE_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
RELEASE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
RELEASE_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: ./gradlew bundleRelease
- name: Upload AAB artifact
uses: actions/upload-artifact@v7
with:
name: app-release-bundle
path: android/app/build/outputs/bundle/release/app-release.aab
- name: Publish to Play Store
uses: r0adkll/upload-google-play@e738b9dd8f2476ea806d921b64aacd24f34515a5 # v1.1.5
with:
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_SERVICE_ACCOUNT_JSON }}
packageName: cc.agentlabs.opencode
releaseFiles: android/app/build/outputs/bundle/release/app-release.aab
track: ${{ github.event.inputs.track || 'internal' }}
status: ${{ github.event.inputs.status || 'completed' }}
whatsNewDirectory: distribution/whatsnew