Skip to content

Release (Beta)

Release (Beta) #54

Workflow file for this run

name: Release (Beta)
on:
workflow_dispatch:
push:
paths:
- 'app/**'
branches: [ beta ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: 17
cache: gradle
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Cache Ruby - Bundler
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Cache Gradle
uses: actions/cache@v4
with:
path: ~/.gradle/caches/
key: cache-clean-gradle-${{ matrix.os }}-${{ matrix.jdk }}
- name: Cache Gradle Wrapper
uses: actions/cache@v4
with:
path: ~/.gradle/wrapper/
key: cache-clean-wrapper-${{ matrix.os }}-${{ matrix.jdk }}
- name: Grant Permission to Execute
run: chmod +x gradlew
# - name: run tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 33
# script: ./gradlew connectedCheck
- name: Install bundle
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Configure Keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > keystore.jks.b64
base64 -d -i keystore.jks.b64 > app/keystore.jks
echo "storeFile=keystore.jks" >> keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties
echo "sentryDsn=$SENTRY_DSN" >> keystore.properties
echo "youtubeApiKey=$YOUTUBE_API_KEY" >> keystore.properties
echo "spotifyClientId=$SPOTIFY_CLIENT_ID" >> keystore.properties
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
- name: Create Google Play Config file
run: |
echo "$PLAY_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }}
- name: Distribute app to Beta track 🚀
run: bundle exec fastlane beta