forked from openMF/mifos-mobile-github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (99 loc) · 2.95 KB
/
promote-to-production.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# GitHub Actions Workflow for Play Store Release Promotion
#
# PURPOSE:
# This workflow automates the process of promoting a beta release
# to the production track on Google Play Store.
#
# PREREQUISITES:
# 1. Fastlane setup with Android deployment configurations
# 2. Configured Fastlane lanes:
# - `promote_to_production`: Handles beta to production promotion
#
# REQUIRED CONFIGURATION:
# - Secrets:
# playstore_creds: Google Play Store service account JSON credentials
#
# WORKFLOW TRIGGERS:
# - Can be called manually or triggered by other workflows
# - Typically used after beta testing and validation
#
# DEPLOYMENT PROCESS:
# 1. Checks out repository code
# 2. Sets up Ruby and Fastlane environment
# 3. Inflates Play Store credentials
# 4. Runs Fastlane lane to promote beta to production
#
# IMPORTANT NOTES:
# - Requires proper Fastlane configuration in your project
# - Ensures consistent and automated Play Store deployments
# - Configurable retry mechanism for upload stability
#
# RECOMMENDED FASTLANE LANE IMPLEMENTATION:
# ```ruby
# lane :promote_to_production do
# upload_to_play_store(
# track: 'beta',
# track_promote_to: 'production',
# json_key: './playStorePublishServiceCredentialsFile.json'
# )
# end
# ```
### Example Workflow
# ```yaml
# name: Promote Release to Play Store
#
# 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 ]
#
# concurrency:
# group: "production-deploy"
# cancel-in-progress: false
#
# permissions:
# contents: write
#
# jobs:
# # Job to promote app from beta to production in Play Store
# play_promote_production:
# name: Promote Beta to Production Play Store
# uses: openMF/mifos-mobile-github-actions/.github/workflows/promote-to-production.yaml@main
# if: ${{ inputs.publish_to_play_store == true }}
# secrets: inherit
# with:
# android_package_name: 'mifospay-android'
# ```
#
# 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: Promote Release to Play Store
on:
workflow_call:
secrets:
playstore_creds:
description: 'Base64 Encoded Play Console Service Key'
required: true
permissions:
contents: write
jobs:
# Job to promote app from beta to production in Play Store
play_promote_production:
name: Play Publish Production
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Promote Beta to Production Play Store
uses: openMF/[email protected]
with:
playstore_creds: ${{ secrets.playstore_creds }}