-
Notifications
You must be signed in to change notification settings - Fork 11
69 lines (67 loc) · 2.45 KB
/
promote.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
name: Promote Google Play build from track to another
on:
# Enable manual run
workflow_dispatch:
inputs:
promote_from:
description: "Promote from"
required: true
default: "alpha"
type: choice
options:
- production
- beta
- alpha
- internal
promote_to:
description: "Promote to"
required: true
default: "beta"
type: choice
options:
- production
- beta
- alpha
- internal
permissions: read-all
jobs:
promote-android:
name: Promote Android Release from ${{ github.event.inputs.promote_from }} to ${{ github.event.inputs.promote_to }}
runs-on: ubuntu-latest
steps:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter doctor -v
# Checkout Repo code
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Dart Language
uses: dart-lang/[email protected]
- name: Get Project Version
run: "dart workflows_utils/get_project_version.dart"
# Setup Ruby, Bundler, Gemfile & flutter dependencies & Build Android
- name: Setup Fastlane
uses: ruby/setup-ruby@72d59482210349c1114eca714b6c5df19fbbec34
with:
ruby-version: "2.6"
bundler-cache: true
working-directory: android
- name: Configure Keystore
run: |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
echo "storeFile=upload-keystore.jks" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
working-directory: android
- run: bundle exec fastlane android promote from:${{ github.event.inputs.promote_from }} to:${{ github.event.inputs.promote_to }} version_name:${{ env.version_name }} version_code:${{ env.version_code }}
working-directory: android
env:
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }}