-
-
Notifications
You must be signed in to change notification settings - Fork 282
148 lines (130 loc) · 5.65 KB
/
ios-release-to-org-openfoodfacts-scanner.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
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
name: App Store release to org.openfoodfacts.scanner
on:
workflow_call:
inputs:
VERSION_NAME:
required: true
type: string
VERSION_CODE:
required: true
type: string
secrets:
SENTRY_AUTH_TOKEN:
required: true
FASTLANE_USER:
required: true
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD:
required: true
MATCH_GIT_BASIC_AUTHORIZATION:
required: true
MATCH_GIT_URL:
required: true
MATCH_KEYCHAIN_PASSWORD:
required: true
MATCH_PASSWORD:
required: true
PILOT_APPLE_ID:
required: true
SPACESHIP_CONNECT_API_ISSUER_ID:
required: true
SPACESHIP_CONNECT_API_KEY_ID:
required: true
AUTH_KEY_FILE_DECRYPTKEY:
required: true
env:
JAVA_VERSION: 21
RUBY_VERSION: 3.2.0
jobs:
testflight-release:
name: Build and deploy to TestFlight testers (org.openfoodfacts.scanner)
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ env.RUBY_VERSION }}
- name: bundle install
run: bundle install
working-directory: ./packages/smooth_app/ios/
- name: bundle install
run: bundle install
working-directory: ./packages/smooth_app/android/
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
# Get the flutter version from ./flutter-version.txt
- run: echo "FLUTTER_VERSION=$(cat flutter-version.txt)" >> $GITHUB_OUTPUT
id: flutter-version
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
#channel: stable
cache: true
flutter-version: ${{ steps.flutter-version.outputs.FLUTTER_VERSION }}
cache-key: flutter-${{ hashFiles('flutter-version.txt')}}-${{ hashFiles('packages\smooth_app\pubspec.lock')}}
- name: Flutter version
run: flutter --version
- name: Enable MLKit dependency
run: chmod +x ci/dependencies/scanner/enable_mlkit_dependency.sh && ci/dependencies/scanner/enable_mlkit_dependency.sh
- name: Enable Apple App Store dependency
run: chmod +x ci/dependencies/app_store/enable_apple_app_store_dependency.sh && ci/dependencies/app_store/enable_apple_app_store_dependency.sh
- name: Get dependencies
run: ci/pub_upgrade.sh
- name: Bundle install
run: cd ./packages/smooth_app/ios && gem install bundler:1.17.3 && bundle install
- name: Decrypt iOS AuthKey file
run: cd ./packages/smooth_app/ios/fastlane/envfiles && chmod +x decrypt_secrets.sh && ./decrypt_secrets.sh
env:
AUTH_KEY_FILE_DECRYPTKEY: ${{ secrets.AUTH_KEY_FILE_DECRYPTKEY }}
# We are using the android version code here to have the version codes from iOS and android in sync
# in order for Sentry and other tools to work properly
- name: Bump version
uses: maierj/[email protected]
with:
lane: setVersion
subdirectory: ./packages/smooth_app/android/
env:
VERSION_NAME: ${{ inputs.VERSION_NAME }}
VERSION_CODE: ${{ inputs.VERSION_CODE }}
- name: Build app
run: cd ./packages/smooth_app && cd ios && rm -rf Pods && rm -f Podfile.lock && flutter pub get && pod install && cd .. && flutter build ios --release --no-codesign -t lib/entrypoints/ios/main_ios.dart
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PILOT_APPLE_ID: ${{ secrets.PILOT_APPLE_ID }}
SPACESHIP_CONNECT_API_ISSUER_ID: ${{ secrets.SPACESHIP_CONNECT_API_ISSUER_ID }}
SPACESHIP_CONNECT_API_KEY_ID: ${{ secrets.SPACESHIP_CONNECT_API_KEY_ID }}
SPACESHIP_CONNECT_API_KEY_FILEPATH: ./fastlane/envfiles/AuthKey_KDAUTTM76R.p8
CI_RELEASE: true
- name: cat Podfile
run: cd ./packages/smooth_app/ios && cat Podfile
- name: Release ipa
run: cd ./packages/smooth_app/ios && bundle exec fastlane beta
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
FASTLANE_USER: ${{ secrets.FASTLANE_USER }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PILOT_APPLE_ID: ${{ secrets.PILOT_APPLE_ID }}
SPACESHIP_CONNECT_API_ISSUER_ID: ${{ secrets.SPACESHIP_CONNECT_API_ISSUER_ID }}
SPACESHIP_CONNECT_API_KEY_ID: ${{ secrets.SPACESHIP_CONNECT_API_KEY_ID }}
SPACESHIP_CONNECT_API_KEY_FILEPATH: ./fastlane/envfiles/AuthKey_KDAUTTM76R.p8
CI_RELEASE: true