Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

ci(mobile): signed Android and iOS release workflow for Play internal and TestFlight

debpalash79b24d2b3744
diff --git a/.github/workflows/mobile-release.yml b/.github/workflows/mobile-release.yml
new file mode 100644
index 000000000..ff187fe7f
--- /dev/null
+++ b/.github/workflows/mobile-release.yml
@@ -0,0 +1,216 @@
+# Mobile release — signed Android APK/AAB and iOS IPA, uploaded to the Play
+# internal track and TestFlight. Promotion to production is a manual step in
+# each store console. The app version is the root package.json version; each
+# run's number is the store build number (VS_BUILD_NUMBER). Secrets live in the
+# protected `mobile-release` environment; see docs/mobile.md → Releasing.
+
+name: mobile-release
+
+on:
+ workflow_dispatch:
+ inputs:
+ android:
+ description: Build Android
+ type: boolean
+ default: true
+ ios:
+ description: Build iOS
+ type: boolean
+ default: true
+ upload:
+ description: Upload to Play internal and TestFlight (off = signed artifacts only)
+ type: boolean
+ default: false
+ push:
+ tags: ["mobile-v*"]
+
+permissions:
+ contents: read
+
+concurrency:
+ group: mobile-release
+ cancel-in-progress: false
+
+env:
+ VS_BUILD_NUMBER: ${{ github.run_number }}
+
+jobs:
+ android:
+ if: github.event_name == 'push' || inputs.android
+ runs-on: ubuntu-24.04
+ timeout-minutes: 60
+ environment: mobile-release
+ defaults:
+ run:
+ working-directory: mobile/android
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
+ with:
+ persist-credentials: false
+
+ - uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
+ with:
+ distribution: temurin
+ java-version: "21"
+
+ - uses: gradle/actions/setup-gradle@42ebad84b0585498c0413b0967cf4e80ec0e1d19 # v4.4.1
+
+ - name: SDK location
+ run: printf 'sdk.dir=%s\n' "$ANDROID_HOME" > local.properties
+
+ - name: NDK and CMake
+ run: yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;27.1.12297006" "cmake;3.22.1" > /dev/null
+
+ - name: Cache native runtimes
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
+ with:
+ path: mobile/native/android/build
+ key: android-native-${{ hashFiles('mobile/native/pins.json', 'mobile/native/android/**', '!mobile/native/android/build/**') }}
+
+ - name: Decode keystore
+ env:
+ KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
+ run: |
+ test -n "$KEYSTORE_B64" || { echo "::error::ANDROID_KEYSTORE_BASE64 is not set in the mobile-release environment"; exit 1; }
+ echo "$KEYSTORE_B64" | base64 -d > "$RUNNER_TEMP/release.keystore"
+
+ - name: Build signed APK and AAB
+ env:
+ VS_ANDROID_KEYSTORE: ${{ runner.temp }}/release.keystore
+ VS_ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
+ VS_ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
+ VS_ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
+ run: ./gradlew --no-daemon :app:assembleRelease :app:bundleRelease
+
+ - name: Collect outputs
+ run: |
+ mkdir -p "$RUNNER_TEMP/out"
+ cp app/build/outputs/apk/release/*.apk "$RUNNER_TEMP/out/VoiceStudio.apk"
+ cp app/build/outputs/bundle/release/*.aab "$RUNNER_TEMP/out/VoiceStudio.aab"
+
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: VoiceStudio-android-release
+ path: ${{ runner.temp }}/out
+ retention-days: 30
+
+ - name: Upload to Play internal track
+ if: github.event_name == 'push' || inputs.upload
+ uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3
+ with:
+ serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
+ packageName: com.voicestudio.mobile
+ releaseFiles: ${{ runner.temp }}/out/VoiceStudio.aab
+ track: internal
+ status: completed
+
+ - name: Remove keystore
+ if: always()
+ run: rm -f "$RUNNER_TEMP/release.keystore"
+
+ ios:
+ if: github.event_name == 'push' || inputs.ios
+ runs-on: macos-15
+ timeout-minutes: 80
+ environment: mobile-release
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
+ with:
+ persist-credentials: false
+
+ - name: Cache native runtimes
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
+ with:
+ path: mobile/native/ios/build
+ key: ios-native-${{ hashFiles('mobile/native/pins.json', 'mobile/native/ios/**', '!mobile/native/ios/build/**') }}
+
+ - name: Build native runtimes
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: |
+ brew install cmake ninja 2>/dev/null || true
+ bash mobile/native/ios/build.sh ios
+
+ - name: Generate Xcode project
+ run: |
+ brew install xcodegen
+ xcodegen generate --spec mobile/ios/VoiceStudio/project.yml
+
+ # A temporary keychain holds the distribution certificate; removed at the end.
+ - name: Install certificate and profile
+ env:
+ CERT_B64: ${{ secrets.IOS_CERT_P12_BASE64 }}
+ CERT_PASSWORD: ${{ secrets.IOS_CERT_PASSWORD }}
+ PROFILE_B64: ${{ secrets.IOS_PROFILE_BASE64 }}
+ run: |
+ test -n "$CERT_B64" && test -n "$PROFILE_B64" || { echo "::error::iOS signing secrets are not set in the mobile-release environment"; exit 1; }
+ KEYCHAIN="$RUNNER_TEMP/release.keychain-db"
+ KEYCHAIN_PASSWORD="$(uuidgen)"
+ security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
+ security set-keychain-settings -lut 21600 "$KEYCHAIN"
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
+ echo "$CERT_B64" | base64 -d > "$RUNNER_TEMP/cert.p12"
+ security import "$RUNNER_TEMP/cert.p12" -P "$CERT_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN"
+ security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN" > /dev/null
+ security list-keychains -d user -s "$KEYCHAIN" login.keychain
+ echo "$PROFILE_B64" | base64 -d > "$RUNNER_TEMP/profile.mobileprovision"
+ security cms -D -i "$RUNNER_TEMP/profile.mobileprovision" > "$RUNNER_TEMP/profile.plist"
+ PROFILE_UUID=$(/usr/libexec/PlistBuddy -c "Print :UUID" "$RUNNER_TEMP/profile.plist")
+ PROFILE_NAME=$(/usr/libexec/PlistBuddy -c "Print :Name" "$RUNNER_TEMP/profile.plist")
+ mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles"
+ cp "$RUNNER_TEMP/profile.mobileprovision" "$HOME/Library/MobileDevice/Provisioning Profiles/$PROFILE_UUID.mobileprovision"
+ echo "PROFILE_NAME=$PROFILE_NAME" >> "$GITHUB_ENV"
+
+ - name: Archive
+ env:
+ TEAM_ID: ${{ secrets.IOS_TEAM_ID }}
+ run: |
+ xcodebuild archive \
+ -project mobile/ios/VoiceStudio/VoiceStudio.xcodeproj \
+ -scheme VoiceStudio -configuration Release -destination 'generic/platform=iOS' \
+ -archivePath "$RUNNER_TEMP/VoiceStudio.xcarchive" \
+ CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="Apple Distribution" \
+ DEVELOPMENT_TEAM="$TEAM_ID" PROVISIONING_PROFILE_SPECIFIER="$PROFILE_NAME"
+
+ - name: Export IPA
+ env:
+ TEAM_ID: ${{ secrets.IOS_TEAM_ID }}
+ run: |
+ cat > "$RUNNER_TEMP/ExportOptions.plist" <<PLIST
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0"><dict>
+ <key>method</key><string>app-store-connect</string>
+ <key>teamID</key><string>$TEAM_ID</string>
+ <key>signingStyle</key><string>manual</string>
+ <key>provisioningProfiles</key><dict><key>com.voicestudio.mobile</key><string>$PROFILE_NAME</string></dict>
+ </dict></plist>
+ PLIST
+ xcodebuild -exportArchive -archivePath "$RUNNER_TEMP/VoiceStudio.xcarchive" \
+ -exportOptionsPlist "$RUNNER_TEMP/ExportOptions.plist" -exportPath "$RUNNER_TEMP/ipa"
+ ls "$RUNNER_TEMP/ipa"/*.ipa
+
+ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
+ with:
+ name: VoiceStudio-ios-release
+ path: ${{ runner.temp }}/ipa/*.ipa
+ retention-days: 30
+
+ - name: Upload to TestFlight
+ if: github.event_name == 'push' || inputs.upload
+ env:
+ ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
+ ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
+ ASC_KEY_P8: ${{ secrets.ASC_KEY_P8 }}
+ run: |
+ mkdir -p "$HOME/.appstoreconnect/private_keys"
+ printf '%s' "$ASC_KEY_P8" > "$HOME/.appstoreconnect/private_keys/AuthKey_${ASC_KEY_ID}.p8"
+ xcrun altool --upload-app --type ios --file "$RUNNER_TEMP"/ipa/*.ipa \
+ --apiKey "$ASC_KEY_ID" --apiIssuer "$ASC_ISSUER_ID"
+
+ - name: Remove signing material
+ if: always()
+ run: |
+ security delete-keychain "$RUNNER_TEMP/release.keychain-db" || true
+ rm -f "$RUNNER_TEMP/cert.p12" "$HOME/.appstoreconnect/private_keys/"*.p8
+ rm -rf "$HOME/Library/MobileDevice/Provisioning Profiles"
diff --git a/docs/mobile.md b/docs/mobile.md
index a43accb3e..75b431407 100644
--- a/docs/mobile.md
+++ b/docs/mobile.md
@@ -91,3 +91,23 @@ after 7 days; turn on Developer Mode on the iPhone (Settings → Privacy &
Security) when iOS asks. App text uses the
Electron locale catalogs (`mobile.*` keys). The `mobile` workflow builds and
tests both apps.
+
+## Releasing
+
+The `mobile-release` workflow builds the signed Android APK/AAB and iOS IPA and,
+when asked, uploads them to the Play **internal** track and **TestFlight**. It
+never publishes to production; promote a build in each store console.
+
+- **Run it:** Actions → `mobile-release` → Run workflow (uploads are off by
+ default, so you get signed artifacts to test), or push a `mobile-v*` tag
+ (builds and uploads both).
+- **Version:** the root `package.json` version. Each run's number is the store
+ build number, so a rebuild of the same version still uploads.
+- **Secrets** (repository environment `mobile-release`, with required reviewers):
+ - Android: `ANDROID_KEYSTORE_BASE64`, `ANDROID_KEYSTORE_PASSWORD`,
+ `ANDROID_KEY_ALIAS`, `ANDROID_KEY_PASSWORD`, `PLAY_SERVICE_ACCOUNT_JSON`
+ - iOS: `IOS_CERT_P12_BASE64`, `IOS_CERT_PASSWORD`, `IOS_PROFILE_BASE64`
+ (App Store distribution profile for `com.voicestudio.mobile`), `IOS_TEAM_ID`,
+ `ASC_KEY_ID`, `ASC_ISSUER_ID`, `ASC_KEY_P8`
+- **First upload:** create the app records in Play Console and App Store Connect
+ first; Play needs the first bundle uploaded once and the data-safety form filled.