Merge pull request #303 from PermanentOrg/feature/VSP-1447 #102
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: Deploy to Staging | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master", "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: staging | |
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/google-services.json | |
echo $GOOGLE_SERVICES | base64 --decode > app/google-services.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 firebase | |
shell: bash |