Skip to content

CICD: Try upgrade xcode #344

CICD: Try upgrade xcode

CICD: Try upgrade xcode #344

Workflow file for this run

on:
pull_request:
name: Build
env:
FLUTTER_VERSION: 3.13.7
jobs:
build_debug_mobile:
name: Build debug version for mobiles
runs-on: macos-13
# strategy:
# matrix:
# include:
# - os: android
# runner: ubuntu-latest
# - os: ios
# runner: macos-13-xl
# fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}"
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
working-directory: ${{ matrix.os }}
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Setup Java
if: matrix.os == 'android'
uses: actions/setup-java@v3
with:
distribution: "temurin" # See 'Supported distributions' for available options
java-version: "11"
- name: Select Xcode version
if: matrix.os == 'ios'
run: sudo xcode-select -s '/Applications/Xcode_15.0.1.app/Contents/Developer'
- name: FLutter doctor
run: flutter doctor
- name: Setup iOS
if: matrix.os == 'ios'
run: ./scripts/prepare-ios.sh
- name: Build debug APK
if: matrix.os == 'android'
run: |
./scripts/build-android-debug.sh
cp build/app/outputs/apk/debug/app-debug.apk twake-on-matrix-debug.apk
- name: Build debug IPA
if: matrix.os == 'ios'
env:
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: |
bundle exec fastlane dev
cp Runner.ipa ../Runner.ipa
working-directory: ${{ matrix.os }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: twake-on-matrix-dev-mobile
path: |
twake-on-matrix-debug.apk
Runner.ipa
# build_debug_desktop:
# name: Build debug version for desktops
# runs-on: ${{ matrix.runner }}
# strategy:
# matrix:
# include:
# - os: macos
# runner: macos-latest
# - os: windows
# runner: windows-latest
# - os: linux
# runner: ubuntu-latest
# fail-fast: false
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Setup Flutter
# uses: subosito/flutter-action@v2
# with:
# flutter-version: ${{ env.FLUTTER_VERSION }}
# channel: "stable"
# cache: true
# cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}"
# - uses: webfactory/[email protected]
# with:
# ssh-private-key: ${{ secrets.SSH_KEY }}
# - name: Setup
# run: |
# ssh-keyscan github.com >> ~/.ssh/known_hosts
# flutter pub global activate flutter_distributor
# shell: bash
# - name: Setup Fastlane (macOS only)
# uses: ruby/setup-ruby@v1
# if: matrix.os == 'macos'
# with:
# ruby-version: ruby
# bundler-cache: true
# working-directory: ${{ matrix.os }}
# - name: Build
# env:
# APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
# MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
# run: ./scripts/build-${{ matrix.os }}-debug.sh
# shell: bash
# - name: Package
# run: ./scripts/package-${{ matrix.os }}-debug.sh
# shell: bash
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: twake-on-matrix-dev-${{ matrix.os }}
# path: dist/