Skip to content

Deploy the Android app to Playstore internal track #73

Deploy the Android app to Playstore internal track

Deploy the Android app to Playstore internal track #73

name: Deploy the Android app to Playstore internal track
on:
workflow_dispatch:
inputs:
version:
description: Build version (eg 0.30.0)
required: true
build-number:
description: Build number
required: true
message:
description: Change logs
required: false
jobs:
build:
runs-on: [ self-hosted, internal-chplay ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.0"
channel: stable
- name: Set env
run: |
echo "FLUTTER_VERSION_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV
echo "FLUTTER_VERSION_CODE=${{ github.event.inputs.build-number }}" >> $GITHUB_ENV
echo "BRANCH_KEY=${{ secrets.BRANCH_KEY }}" >> $GITHUB_ENV
echo "BRANCH_KEY_TEST=${{ secrets.BRANCH_KEY_TEST }}" >> $GITHUB_ENV
echo "SIGNATURE_HASH=${{ secrets.SIGNATURE_HASH }}" >> $GITHUB_ENV
echo "SIGNATURE_HASH_INHOUSE=${{ secrets.SIGNATURE_HASH_INHOUSE }}" >> $GITHUB_ENV
echo NAME_SUFFIX=main-${{ github.event.inputs.build-number }} >> $GITHUB_ENV
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.KEY_VAULT_DEPLOYMENT_KEY }}
${{ secrets.SSH_ASSETS_KEY }}
- name: Create env file
run: |
touch .env
echo -e "${{ secrets.PRODUCTION_ENV_VARS }}" | sed 's/\\n/\n/g' >> .env
cat .env
- name: Submodules update
run: git -c submodule.auto-test.update=none submodule update --init --recursive
- run: flutter pub cache repair
- run: flutter pub get
- name: Clone the Key Vault
run: |
git clone [email protected]:bitmark-inc/mobile-signing-key-vault.git --depth 1
cp mobile-signing-key-vault/android/bitmark-autonomy/release.keystore android/release.keystore
cp mobile-signing-key-vault/android/bitmark-autonomy/release.properties android/release.properties
- run: flutter build appbundle --flavor production --release
- name: Release notes
run: |
mkdir whatsnew
echo "${{ github.event.inputs.message }}" > ./whatsnew/whatsnew-en-US
# Upload APK to Google Play Internal Testing track
- name: Upload APK to Google Play
uses: r0adkll/[email protected]
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT }}
packageName: com.bitmark.autonomy_client
releaseFiles: build/app/outputs/bundle/productionRelease/app-production-release.aab
track: internal
mappingFile: build/app/outputs/bundle/productionRelease/mapping.txt
whatsNewDirectory: ./whatsnew
changesNotSentForReview: true