Merge pull request #309 from PermanentOrg/bugfix/fixes-for-release #55
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: Release to Play store | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "release/**" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Retrieve the google services file and decode it to a file | |
env: | |
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | |
run: | | |
rm app/src/production/google-services.json | |
echo $GOOGLE_SERVICES | base64 --decode > app/src/production/google-services.json | |
- name: Write the play store json | |
env: | |
JSON_KEY: ${{ secrets.JSON_KEY }} | |
run: | | |
echo $JSON_KEY | base64 --decode > fastlane/pc-store.json | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Update Bundler | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6.8' | |
bundler-cache: false | |
- name: Install bundle gems | |
run: bundle install | |
- name: Run Fastlane Firebase | |
env: | |
GMP_KEY: ${{ secrets.GMP_KEY }} | |
AUTH_CLIENT_ID: ${{ secrets.AUTH_CLIENT_ID }} | |
AUTH_CLIENT_SECRET: ${{ secrets.AUTH_CLIENT_SECRET }} | |
PUBLISHABLE_KEY: ${{ secrets.PUBLISHABLE_KEY }} | |
APP_ID: ${{ secrets.APP_ID }} | |
FIREBASEAPPDISTRO_CLI_TOKEN: ${{ secrets.FIREBASEAPPDISTRO_CLI_TOKEN }} | |
KEYSTORE_FILE: '${{ github.workspace }}/permanent.keystore' | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} | |
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }} | |
run: | | |
touch local.properties | |
echo GMP_KEY="$GMP_KEY" >> local.properties | |
echo AUTH_CLIENT_ID="$AUTH_CLIENT_ID" >> local.properties | |
echo AUTH_CLIENT_SECRET="$AUTH_CLIENT_SECRET" >> local.properties | |
echo PUBLISHABLE_KEY="$PUBLISHABLE_KEY" >> local.properties | |
echo MIXPANEL_TOKEN="$MIXPANEL_TOKEN" >> local.properties | |
bundle exec fastlane playStore | |
shell: bash |