-
Notifications
You must be signed in to change notification settings - Fork 23
116 lines (96 loc) · 3.4 KB
/
app-distribute.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: App Distribute CI
on:
push:
branches:
- main
paths:
- dogfooding/**
env:
FLUTTER_VERSION: '3.24.3'
FLUTTER_CHANNEL: stable
ENV_PROPERTIES: ${{ secrets.ENV_PROPERTIES }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
CREDENTIAL_FILE_CONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
FASTLANE_APPLE_ID: ${{ secrets.FASTLANE_APPLE_ID }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_deploy_ios:
name: Build and Distribute Dogfooding Ios
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Install Bot SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup Melos
run: flutter pub global activate melos
- name: Bootstrap workspace
run: melos bootstrap
- name: Prepare environment
run: |
echo "${{ env.ENV_PROPERTIES }}" > .env
echo "${{ env.APPSTORE_API_KEY }}" | base64 --decode > ~/.ssh/appstore_api_key
- name: Setup Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: dogfooding/ios
bundler-cache: true
- name: Build and Distribute
run: |
cd dogfooding/ios
bundle exec fastlane ios build_and_deploy
build_and_deploy_android:
name: Build and Distribute Dogfooding Android
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: ⚙️ Set up Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup Melos
run: flutter pub global activate melos
- name: Bootstrap workspace
run: melos bootstrap
- name: Prepare environment
run: |
echo "${{ env.ENV_PROPERTIES }}" > .env
echo "${{ env.CREDENTIAL_FILE_CONTENT }}" | base64 --decode | jq > dogfooding/android/firebase-service-account.json
- name: Setup Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: dogfooding/android
bundler-cache: true
- name: Setup Keystore
run: |
echo ${{ secrets.KEYSTORE }} | base64 --decode > dogfooding/android/upload-keystore.jks
echo ${{ secrets.KEYSTORE_PROPERTIES }} | base64 --decode > dogfooding/android/key.properties
- name: Build and Distribute
run: |
cd dogfooding/android
bundle exec fastlane android build_and_deploy