Manual QA Distribution #798
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Manual QA Distribution | |
on: | |
workflow_dispatch: | |
inputs: | |
taskID: | |
description: 'Task ID' | |
required: true | |
default: 'NMA-' | |
flavor: | |
description: 'Flavor' | |
required: true | |
default: 'staging' | |
type: | |
description: 'Type' | |
required: true | |
default: 'release' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Map flavor to firebase app id | |
uses: kanga333/variable-mapper@master | |
with: | |
key: "${{ github.event.inputs.flavor }}" | |
map: | | |
{ | |
"prod": { | |
"firebase_app_id": "1:1039839682638:android:989eecd6db36de6a" | |
}, | |
"_testNet3": { | |
"firebase_app_id": "1:1039839682638:android:3202b16d460a1a88" | |
}, | |
"staging": { | |
"firebase_app_id": "1:1039839682638:android:bbcfa8c9939ee993ea631f" | |
}, | |
"devnet": { | |
"firebase_app_id": "1:1039839682638:android:12d2ad31cc39093cea631f" | |
} | |
} | |
- name: Get build number from run id | |
env: | |
run_num: ${{ github.run_number }} | |
run: | | |
echo "build_number=$((70000+$run_num))" >> $GITHUB_ENV | |
- name: Get the support email | |
env: | |
SUPPORT_EMAIL: "${{ secrets.INTERNAL_SUPPORT_EMAIL }}" | |
run: | | |
echo "SUPPORT_EMAIL=$SUPPORT_EMAIL" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- name: set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '16' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0.3' | |
- name: Generate cache key | |
run: bash .deploy/checksum.sh checksum.txt | |
- name: Gem caching | |
uses: actions/cache@v2 | |
continue-on-error: true | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Setup fastlane | |
run: | | |
gem install bundler:2.2.26 | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Cache Gradle packages | |
uses: actions/cache@v2 | |
continue-on-error: true | |
with: | |
path: | | |
~/.gradle/caches/modules-* | |
~/.gradle/caches/jars-* | |
~/.gradle/caches/build-cache-* | |
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }} | |
- name: Decrypt secrets | |
run: | | |
gpg -d --passphrase "${{ secrets.KEYSTORE_KEY }}" --batch .deploy/keystore.jks.gpg > .deploy/keystore.jks | |
- name: Extract Secrets | |
run: | | |
echo "$GOOGLE_SERVICES_JSON" > wallet/google-services.json | |
echo "$SERVICE_PROPERTIES" > service.properties | |
echo "$LOCAL_PROPERTIES" > local.properties | |
echo "$APP_DISTRIBUTION_KEY_JSON" > .deploy/app-distribution-key.json | |
echo "$GC_STORAGE_SERVICE_ACCOUNT_KEY_JSON" > .deploy/gc-storage-service-account.json | |
env: | |
GOOGLE_SERVICES_JSON : ${{secrets.GOOGLE_SERVICES_JSON}} | |
SERVICE_PROPERTIES: ${{secrets.SERVICE_PROPERTIES}} | |
LOCAL_PROPERTIES: ${{secrets.LOCAL_PROPERTIES}} | |
APP_DISTRIBUTION_KEY_JSON: ${{secrets.APP_DISTRIBUTION_KEY_JSON}} | |
GC_STORAGE_SERVICE_ACCOUNT_KEY_JSON: ${{secrets.GC_STORAGE_SERVICE_ACCOUNT_KEY_JSON}} | |
- name: Extract Secrets | |
run: | | |
echo "$GOOGLE_SERVICES_JSON" > wallet/google-services.json | |
env: | |
GOOGLE_SERVICES_JSON : ${{secrets.GOOGLE_SERVICES_JSON}} | |
- name: Copy explore.db from GC Storage | |
run: | | |
gem install google-cloud-storage | |
rm -rf wallet/assets/explore/* | |
ruby .deploy/exploredata.rb "${{ github.event.inputs.flavor }}" | |
- name: Test | |
run: bundle exec fastlane test flavor:"${{ github.event.inputs.flavor }}" type:"${{ github.event.inputs.type }}" version_code:"${{ env.build_number }}" store_pass:"${{ secrets.SIGNING_STORE_PASS }}" | |
- name: Build and Firebase Distribution | |
run: bundle exec fastlane build_distribute flavor:"${{ github.event.inputs.flavor }}" type:"${{ github.event.inputs.type }}" version_code:"${{ env.build_number }}" store_pass:"${{ secrets.SIGNING_STORE_PASS }}" comment:"${{ github.event.inputs.taskID }}" app_id:"${{ env.firebase_app_id }}" test_group:"qa" |