Skip to content

Build 54.4 (iOS only) #31

Build 54.4 (iOS only)

Build 54.4 (iOS only) #31

name: Flutter release ios
on:
release:
types: [published]
jobs:
DeployIosBetaAdhoc:
name: Build and release beta adhoc
if: ${{ !contains ( github.event.release.tag_name, '_' ) || endsWith( github.event.release.tag_name, '_ios' ) }}
# NB: ${{ syntax }} is required despite GitHub docs to the contrary. Appears that ! operator can't be used otherwise.
runs-on: macos-13
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load Flutter config
uses: kuhnroyal/flutter-fvm-config-action@v1
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v3
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
- name: Run analyzer
run: flutter analyze
- name: Run tests
run: flutter test
- name: Choose xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Build iOS App
run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=beta --dart-define KEEVAULT_NAME_SUFFIX='(b)' --dart-define KEEVAULT_ID_SUFFIX=.beta
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler: 2.3.19
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Release beta stage app to beta delivery platform
env:
MATCH_GIT_BASIC_AUTHORIZATION: '${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
TESTFAIRY_API_KEY: '${{ secrets.TESTFAIRY_API_KEY }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
run: |
cd ios
bundle exec fastlane beta_stage
- name: Store symbols on GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
run: |
mv ios/Runner.app.dSYM.zip ios/fairy.Runner.app.dSYM.zip
gh release upload $GH_RELEASE_TAG_NAME ios/fairy.Runner.app.dSYM.zip
DeployIosProdTestflight:
name: Build and release prod testflight
if: ${{ !contains ( github.event.release.tag_name, '_' ) || endsWith( github.event.release.tag_name, '_ios' ) }}
runs-on: macos-13
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load Flutter config
uses: kuhnroyal/flutter-fvm-config-action@v1
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v3
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
- name: Run analyzer
run: flutter analyze
- name: Run tests
run: flutter test
- name: Build iOS App
run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=prod --dart-define KEEVAULT_NAME_SUFFIX= --dart-define KEEVAULT_ID_SUFFIX= --dart-define IAP_APPLE_APP_STORE=yes
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler: 2.3.19
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Release prod stage app to appstore testflight
env:
MATCH_GIT_BASIC_AUTHORIZATION: '${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
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 }}'
APP_STORE_CONNECT_API_KEY_KEY_ID: '${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}'
run: |
cd ios
bundle exec fastlane prod_stage_testflight
- name: Store symbols on GitHub Release
env:
GH_TOKEN: ${{ github.token }}
GH_RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
run: |
mv ios/Runner.app.dSYM.zip ios/production.Runner.app.dSYM.zip
gh release upload $GH_RELEASE_TAG_NAME ios/production.Runner.app.dSYM.zip