CMP-4660: added support for country and region override #376
Workflow file for this run
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: Build | |
# Triggered manually or when code is pushed | |
# (branch name exclusion list below) | |
on: | |
push: | |
branches: | |
- "**" | |
- "!main" # Prevent build when pushing main | |
- "!wip/*" # Prevent build when pushing on wip/* | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
analyse: | |
name: Analyse Flutter | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Install dependencies | |
run: flutter pub get | |
# Uncomment this step to verify the use of 'dart format' on each commit. | |
# - name: Verify formatting | |
# run: dart format --output=none --set-exit-if-changed . | |
# run: dart format --output=none --set-exit-if-changed example | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
- name: Analyze project source | |
run: flutter analyze --no-fatal-infos | |
build_android: | |
name: Build for Android | |
needs: analyse | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Install dependencies | |
run: flutter pub get | |
# Android APK | |
- name: Build Android Sample | |
working-directory: ./example | |
run: flutter build apk -t lib/main.dart | |
# Archive Android APK | |
- name: Archive Android artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: android-app | |
path: example/build/app/outputs/flutter-apk/*.apk | |
retention-days: 5 | |
build_ios: | |
name: Build for iOS | |
needs: analyse | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Install dependencies | |
run: flutter pub get | |
# pod update | |
- name: Run pod update | |
working-directory: ./example/ios | |
run: pod update | |
# iOS IPA | |
- name: Build iOS Sample | |
working-directory: ./example | |
run: | | |
flutter build ios --no-codesign | |
cd build/ios/iphoneos | |
mkdir Payload | |
cd Payload | |
ln -s ../Runner.app | |
cd .. | |
zip -r app.ipa Payload | |
# Archive iOS IPA | |
- name: Archive iOS artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ios-app | |
path: example/build/ios/iphoneos/*.ipa | |
retention-days: 5 |