Skip to content

Deploy on playstore #39

Deploy on playstore

Deploy on playstore #39

name: Deploy on playstore
on:
release:
types:
- published
jobs:
# use fastlane to deploy the App
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Setup jdk-17
uses: actions/setup-java@main
with:
java-version: 17
distribution: 'adopt'
- name: Install Fastlane
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
# google-services.json is from the firebase console
- name: Decode google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }}
run: echo $GOOGLE_SERVICES_JSON > app/google-services.json
- name: Configure Keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.KEYSTORE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
echo "$ANDROID_KEYSTORE_FILE" | base64 -d > app/keystore.jks
echo "storeFile=keystore.jks" > key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
- name: Create Google Play Config file
env:
PLAY_CONFIG_JSON: ${{ secrets.GOOGLE_PLAY_API_AUTH }}
run: |
echo "$PLAY_CONFIG_JSON" > play_config.json
- name: Run Unit tests
run: bundle exec fastlane test
- name: Deploy the app to Internal track 🚀
run: bundle exec fastlane internal