Merge pull request #223 from Monday-Rocket/develop #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy iOS and Android App to App Store and Play Store | |
on: | |
push: | |
branches: | |
- master | |
- hotfix | |
jobs: | |
# TestFlight | |
release-ios: | |
name: Build and release iOS app | |
runs-on: macos-latest | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2.8.0 | |
with: | |
flutter-version: '3.24.3' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1.2' | |
- run: flutter clean | |
- run: flutter pub get | |
- run: echo "${{ secrets.FIREBASE_OPTIONS }}" | base64 -d > ./lib/firebase_options.dart | |
- run: echo '${{ secrets.FIREBASE_APP_ID_FILE }}' | base64 -d > ./ios/firebase_app_id_file.json | |
- run: echo '${{ secrets.GOOGLE_SERVICE_IOS }}' | base64 -d > ./ios/Runner/GoogleService-Info.plist | |
- run: echo '${{ secrets.DOTENV }}' | base64 -d > .env | |
- run: echo '${{ secrets.SECRETS_XCCONFIG }}' | base64 -d > ./ios/Secrets.xcconfig | |
- name: Flutter release build ios | |
run: flutter build ios --release --no-codesign | |
- name: Deploy iOS Beta to TestFlight via Fastlane | |
uses: maierj/fastlane-action@v1.4.0 | |
with: | |
lane: closed_beta | |
subdirectory: ios | |
env: | |
ITC_TEAM_ID: '${{ secrets.ITC_TEAM_ID }}' | |
APPLICATION_ID: '${{ secrets.APPLICATION_ID }}' | |
BUNDLE_IDENTIFIER: '${{ secrets.BUNDLE_IDENTIFIER }}' | |
EXTENSION_IDENTIFIER: '${{ secrets.EXTENSION_IDENTIFIER }}' | |
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' | |
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_EMAIL_ID }}' | |
FASTLANE_PASSWORD: '${{ secrets.FASTLANE_PASSWORD }}' | |
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.APP_SPECIFIC_PASSWORD }}' | |
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' | |
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' | |
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' | |
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' | |
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' | |
# internal test | |
release-android: | |
name: Build and release Android app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '11.x' | |
- uses: subosito/flutter-action@v2.8.0 | |
with: | |
flutter-version: '3.24.3' | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1.2' | |
- name: Install Fastlane | |
run: cd android && bundle install && cd .. | |
- name: Install packages | |
run: flutter pub get | |
- run: echo '${{ secrets.SIGNING_PROPERTIES }}' | base64 -d > ./android/signing.properties | |
- run: echo '${{ secrets.PRIVATE_ANDROID_API_KEY }}' | base64 -d > ./android/playstore-api-key.json | |
- run: echo '${{ secrets.ANDROID_KEYSTORE_BASE64 }}' | base64 -d > ./android/monday-key.jks | |
- run: echo "${{ secrets.FIREBASE_OPTIONS }}" | base64 -d > ./lib/firebase_options.dart | |
- run: echo '${{ secrets.GOOGLE_SERVICES_ANDROID }}' | base64 -d > ./android/app/google-services.json | |
- run: echo '${{ secrets.ANDROID_STRING_SECRET }}' | base64 -d > ./android/app/src/main/res/values/strings_secret.xml | |
- run: echo '${{ secrets.DOTENV }}' | base64 -d > .env | |
- name: Prebuild | |
run: flutter build appbundle | |
- name: Execute Fastlane command | |
run: cd android && fastlane beta |