-
-
Notifications
You must be signed in to change notification settings - Fork 6
92 lines (77 loc) · 2.91 KB
/
deploy_beta.yml
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
name: Deploy Beta to TestFlight and Play Store
on:
workflow_dispatch:
release:
types: [ published ]
jobs:
deploy:
runs-on: macos-15
strategy:
matrix:
platform: [ ios, android ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Bundle
run: cd ./${{ matrix.platform }} && bundle install
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- if: matrix.platform == 'android'
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Install Flutter Packages
run: |
flutter config --no-analytics
flutter pub get
- if: matrix.platform == 'ios'
name: Install latest CocoaPods Version
run: sudo gem install cocoapods
- if: matrix.platform == 'ios'
name: Install CocoaPods
run: cd ./ios && pod install
- if: matrix.platform == 'ios'
name: Add SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MATCH_DEPLOY_KEY }}
- if: matrix.platform == 'ios' && github.event_name == 'release'
name: Build and Deploy With Release Notes to TestFlight
run: |
cd ./ios
bundle exec fastlane ios_beta
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.ASC_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
RELEASE_NOTES: ${{ github.event.release.body }}
- if: matrix.platform == 'ios' && github.event_name != 'release'
name: Build and Deploy to TestFlight
run: |
cd ./ios
bundle exec fastlane ios_beta
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.ASC_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
- if: matrix.platform == 'android'
name: Deserialize Keystore File
run: cd ./android/app && echo "$ANDROID_KEYSTORE_FILE" | base64 --decode > ./upload-keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
- if: matrix.platform == 'android'
name: Deploy to Google Play Store
run: |
cd ./android
bundle exec fastlane android_beta
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
ANDROID_KEYSTORE_FILE: ./upload-keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}