Skip to content

v3.32.0

v3.32.0 #48

Workflow file for this run

# Create android release AAB and upload play store
# Required Secrets
# - ANDROID_KEY_ALIAS
# - ANDROID_KEY_PASSWORD
# - ANDROID_KEY_STORE_PASSWORD
# - ANDROID_SIGNING_KEY_B64
# - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON
# - GOOGLE_SERVICES_JSON
name: Android - Release to Google Play
on:
release:
types: [published]
workflow_dispatch:
# push:
# branches:
# - main
jobs:
android_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
ref: '${{github.event.inputs.build_branch}}'
- uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'yarn'
- run: yarn install --immutable
- name: Populate google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo $GOOGLE_SERVICES_JSON > apps/picsa-apps/extension-app-native/android/app/google-services.json
- name: Install Dependencies
run: yarn install
- name: Build Extension App
run: yarn nx run picsa-apps-extension-app-native:build
# Re-sync as remote cache won't populate files during nx build command
- name: Sync Capacitor
run: npx cap sync
working-directory: apps/picsa-apps/extension-app-native
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-package: jdk
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
# - name: Build Android Debug APK
# working-directory: apps/picsa-apps/extension-app-native/android
# run: ./gradlew :app:assembleDebug
- name: Build Android Release Bundle
working-directory: apps/picsa-apps/extension-app-native/android
run: ./gradlew :app:bundleRelease
- name: Sign Android Release
id: sign_aab
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: apps/picsa-apps/extension-app-native/android/app/build/outputs/bundle/release
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY_B64 }}
alias: ${{ secrets.ANDROID_KEY_ALIAS }}
keyStorePassword: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }}
- name: Upload to Google play
uses: r0adkll/upload-google-play@v1.0.15
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: io.picsa.extension
releaseFile: ${{ env.SIGNED_RELEASE_FILE}}
track: internal
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}