2024.12.2 #2
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
# GitHub Actions workflow for deploying the app to production environments | |
# This workflow handles the promotion of beta releases to production on the Play Store | |
name: Production Deploy | |
# Workflow triggers: | |
# 1. Manual trigger with option to publish to Play Store | |
# 2. Automatic trigger when a GitHub release is published | |
on: | |
workflow_dispatch: | |
inputs: | |
publish_to_play_store: | |
required: false | |
default: false | |
description: Publish to Play Store? | |
type: boolean | |
release: | |
types: [ released ] | |
# Environment variables | |
env: | |
# Maximum number of retries for Play Store upload attempts | |
SUPPLY_UPLOAD_MAX_RETRIES: 5 | |
jobs: | |
# Job to promote app from beta to production in Play Store | |
play_promote_production: | |
name: Play Publish Production | |
# Only run if manually triggered with publish_to_play_store set to true | |
if: ${{ inputs.publish_to_play_store == true }} | |
runs-on: macos-latest | |
steps: | |
# Check out repository code | |
- uses: actions/checkout@v4 | |
# Set up Ruby environment for Fastlane | |
- name: Configure Ruby | |
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1.202.0 | |
with: | |
bundler-cache: true | |
# Install Bundler and required dependencies | |
- name: Install Bundler | |
run: | | |
gem install bundler:2.2.27 | |
bundle install --jobs 4 --retry 3 | |
# Set up necessary secrets for signing and deployment | |
- uses: ./.github/actions/inflate-secrets | |
name: Inflate Secrets | |
with: | |
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }} # Android keystore for app signing | |
google-services: ${{ secrets.GOOGLESERVICES }} # Firebase configuration | |
playstore-creds: ${{ secrets.PLAYSTORECREDS }} # Play Store API credentials | |
firebase-creds: ${{ secrets.FIREBASECREDS }} # Firebase deployment credentials | |
# Use Fastlane to promote the beta version to production | |
- name: Promote Beta to Production Play Store | |
run: | | |
bundle exec fastlane promote_to_production |