123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- name: CI
- on:
- push:
- branches: [ master , main]
- pull_request:
- branches: [ master , main]
- jobs:
- build:
- strategy:
- matrix:
- os: [ macos-latest]
- runs-on: ${{matrix.os}}
- env:
- XC_VERSION: ${{ '11.4' }}
- XC_WORKSPACE: ${{ 'MyApp.xcworkspace' }}
- XC_SCHEME: ${{ 'MyApp' }}
- steps:
- - uses: actions/checkout@v4
- - name: Setup Java JDK
- uses: actions/setup-java@v2
- with:
- distribution: 'adopt'
- java-version: "8.x"
- # - name: Setup gradle
- # uses: eskatos/gradle-command-action@v1
- # with:
- # gradle-version: 6.5
- - name: Flutter action
- uses: subosito/flutter-action@v1.5.3
- with:
- channel: "stable"
- flutter-version: "3.0.5"
-
- - name: Cache Dependencies
- id: cache
- uses: actions/cache@v2
- with:
- path: |
- ~/.gradle/caches
- ~/.gradle/wrapper
- Pods
- key: |
- ${{runner.OS}}-gradle-caches-${{ hashFiles('pubspec.lock') }}
- ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
- restore-keys: |
- ${{ runner.os }}-pods-
- ${{ runner.os }}-gradle-
- - name: Install Dependencies
- if: steps.cache.outputs.cache-hit != 'true'
- run: flutter pub get
- - name: Select latest Xcode
- run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
-
- # base64 build_certificate.p12 | pbcopy
- - name: Install Apple Certificate
- uses: apple-actions/import-codesign-certs@v1
- with:
- p12-file-base64: ${{ secrets.P12_BASE64 }}
- p12-password: ${{ secrets.P12_PASSWORD }}
-
- - name: Build ios
- if: ${{ runner.os == 'macOS' }}
- run: |
- # sudo xcode-select -s /Applications/Xcode_12.3.app
- flutter build ios --release --no-codesign
- # output some file:
- - name: artifact
- uses: actions/upload-artifact@v2
- with:
- name: ${{runner.OS}}-artifact
- path: |
- # build/app/outputs/flutter-apk/**/*.apk
- build/app/outputs/flutter-apk/app.apk
- build/ios/**/*.ipa
- build/web/web-app.zip
- build/windows/runner/Release/
- # build/
|