-
Notifications
You must be signed in to change notification settings - Fork 1
199 lines (167 loc) · 7.15 KB
/
conferenceapp.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Conference App CI
on:
pull_request:
branches:
- dev
paths:
- 'packages/conferenceapp/**'
workflow_dispatch:
inputs:
release-type:
description: 'Type of release'
required: true
type: choice
options:
- build
- patch
default: patch
build-version:
description: 'Version number for the release'
required: true
type: string
build-number:
required: true
type: string
env:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
CERTIFICATE_PRIVATE_KEY: ${{ secrets.CERTIFICATE_PRIVATE_KEY }}
APP_STORE_APP_ID: ${{ secrets.APP_STORE_APP_ID }}
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
ENV_BASE64: ${{ secrets.ENV_BASE64 }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_CREDENTIAL_FILE_CONTENT: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
jobs:
check-formatting:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/shared-workflow.yaml
with:
package-name: conferenceapp
android-build:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-type'] == 'build' }}
uses: ./.github/workflows/shared-workflow.yaml
with:
package-name: conferenceapp
android-build: ${{ github.event.inputs['release-type'] == 'build' }}
build-number: ${{ github.event.inputs['build-number'] }}
build-version: ${{ github.event.inputs['build-version'] }}
secrets:
SERVICE_ACCOUNT_JSON: ${{ secrets.SERVICE_ACCOUNT_JSON }}
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ENV_BASE64: ${{ secrets.ENV_BASE64 }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
FIREBASE_CREDENTIAL_FILE_CONTENT: ${{ secrets.FIREBASE_CREDENTIAL_FILE_CONTENT }}
ios-build:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-type'] == 'build' }}
uses: ./.github/workflows/shared-workflow.yaml
with:
package-name: conferenceapp
ios-build: ${{ github.event.inputs['release-type'] == 'build' }}
build-number: ${{ github.event.inputs['build-number'] }}
build-version: ${{ github.event.inputs['build-version'] }}
secrets:
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.APP_STORE_CONNECT_PRIVATE_KEY }}
CERTIFICATE_PRIVATE_KEY: ${{ secrets.CERTIFICATE_PRIVATE_KEY }}
APP_STORE_APP_ID: ${{ secrets.APP_STORE_APP_ID }}
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
ENV_BASE64: ${{ secrets.ENV_BASE64 }}
patch-android:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-type'] == 'patch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 🐦 Setup Shorebird
uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.3'
cache: true
- name: Setup Java 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Prepare .env file
run: |
echo "${{ secrets.ENV_BASE64 }}" | base64 -d > ${{ github.workspace }}/packages/conferenceapp/.env
- name: Decode Keystore File
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > ${{ github.workspace }}/packages/conferenceapp/upload.jks
- name: Create key.properties File
run: |
echo "storeFile=${{ github.workspace }}/packages/conferenceapp/upload.jks" > ${{ github.workspace }}/packages/conferenceapp/android/key.properties
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> ${{ github.workspace }}/packages/conferenceapp/android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> ${{ github.workspace }}/packages/conferenceapp/android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> ${{ github.workspace }}/packages/conferenceapp/android/key.properties
- name: Enable melos
run: dart pub global activate melos
- name: Get packages
run: melos bootstrap
- name: Generate Files
run: melos generate
- name: 🛠️ Shorebird Patch for Android
id: shorebird-patch-android
working-directory: packages/conferenceapp
run: |
shorebird patch android --allow-native-diffs --release-version ${{ inputs.build-version }}+${{ inputs.build-number }} -- --dart-define-from-file=.env
patch-ios:
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs['release-type'] == 'patch' }}
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 🐦 Setup Shorebird
uses: shorebirdtech/setup-shorebird@v1
with:
cache: true
- name: Debug Secrets
run: 'echo "Key Identifier: ${{ secrets.APP_STORE_CONNECT_KEY_IDENTIFIER }}"'
shell: bash
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.3'
cache: true
- name: Enable melos
run: dart pub global activate melos
- name: Get packages
run: melos bootstrap
- name: Generate Files
run: melos generate
- name: Prepare .env file
run: |
echo "${{ secrets.ENV_BASE64 }}" | base64 -d > ${{ github.workspace }}/packages/conferenceapp/.env
- name: Install Codemagic CLI tools
run: pip install codemagic-cli-tools
working-directory: packages/conferenceapp
- name: Set up keychain
run: keychain initialize
working-directory: packages/conferenceapp
- name: Fetch signing files from App Store Connect
run: |
app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) \
--type IOS_APP_STORE \
--create
working-directory: packages/conferenceapp
- name: Set up signing certificate in keychain
run: keychain add-certificates
working-directory: packages/conferenceapp
- name: Set up code signing in Xcode project
run: xcode-project use-profiles
working-directory: packages/conferenceapp
- name: 🛠️ Shorebird Patch for iOS
id: shorebird-patch-ios
working-directory: packages/conferenceapp
run: |
shorebird patch ios --allow-native-diffs --release-version ${{ inputs.build-version }}+${{ inputs.build-number }} -- --export-options-plist=$HOME/export_options.plist --dart-define-from-file=.env