-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.49 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
name: Deploy Beta to TestFlight and Play Store
on:
push:
branches:
- main
paths:
- 'lib/**'
- 'ios/**'
- 'android/**'
- '.github/workflows/deploy_beta.yml'
- 'pubspec.yml'
jobs:
deploy:
runs-on: macos-latest
strategy:
matrix:
platform: [ ios ] #[ 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
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:arch:'
- 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 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'
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 }}