From cb75677e28a601975cde44852d499a8556aa6c59 Mon Sep 17 00:00:00 2001 From: dab246 Date: Mon, 5 Feb 2024 13:27:04 +0700 Subject: [PATCH] Hotfix: Build app ios failed on CI/CD Signed-off-by: dab246 (cherry picked from commit 4dafebe684f928819190db06808cf3f489d150ae) (cherry picked from commit 121a88d5eab5a4072c5f93ad58a325c07227a6e2) --- .github/workflows/build.yaml | 14 ++++++++++++-- .github/workflows/release.yaml | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f5c26958a..137a72f92 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -5,6 +5,10 @@ on: name: Build dev binaries +env: + FLUTTER_VERSION: 3.16.0 + XCODE_VERSION: ^15.0.1 + jobs: build-app: name: Build app @@ -15,7 +19,7 @@ jobs: - os: android runner: ubuntu-latest - os: ios - runner: macos-latest + runner: macos-13 environment: dev steps: @@ -25,7 +29,7 @@ jobs: - name: Setup flutter uses: subosito/flutter-action@v2 with: - flutter-version: "3.16.0" + flutter-version: ${{ env.FLUTTER_VERSION }} channel: "stable" cache: true cache-key: deps-${{ hashFiles('**/pubspec.lock') }} # optional, change this to force refresh cache @@ -50,6 +54,12 @@ jobs: distribution: "temurin" java-version: "11" + - name: Select Xcode version + if: matrix.os == 'ios' + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ env.XCODE_VERSION }} + - name: Setup iOS environment if: matrix.os == 'ios' run: ../scripts/setup-ios.sh diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 627652546..295901018 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,10 @@ on: name: Release +env: + FLUTTER_VERSION: 3.16.0 + XCODE_VERSION: ^15.0.1 + jobs: release: name: Release @@ -28,7 +32,7 @@ jobs: - name: Setup flutter uses: subosito/flutter-action@v2 with: - flutter-version: "3.16.0" + flutter-version: ${{ env.FLUTTER_VERSION }} channel: "stable" cache: true cache-key: deps-${{ hashFiles('**/pubspec.lock') }} # optional, change this to force refresh cache @@ -53,6 +57,12 @@ jobs: distribution: "temurin" java-version: "11" + - name: Select Xcode version + if: matrix.os == 'ios' + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ env.XCODE_VERSION }} + - name: Setup Android environment if: matrix.os == 'android' env: