feat: add Play Store publish workflow and signing config
This commit is contained in:
58
.github/workflows/publish-play-store.yml
vendored
Normal file
58
.github/workflows/publish-play-store.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: Publish to Google Play Store
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
tags: ["v*"]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
|
||||
- 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@v4
|
||||
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@v1
|
||||
with:
|
||||
serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_SERVICE_ACCOUNT_JSON }}
|
||||
packageName: ai.opencode.mobile
|
||||
releaseFiles: android/app/build/outputs/bundle/release/app-release.aab
|
||||
track: internal
|
||||
status: completed
|
||||
Reference in New Issue
Block a user