123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- name: CI
- on:
- push:
- branches: [ master , main]
- pull_request:
- branches: [ master , main]
- jobs:
- build:
- strategy:
- matrix:
- os: [ windows-latest]
- runs-on: ${{matrix.os}}
- steps:
- - uses: actions/checkout@v2
- - name: Setup Java JDK
- uses: actions/setup-java@v2
- with:
- distribution: 'adopt'
- java-version: "11"
- # - name: Setup gradle
- # uses: eskatos/gradle-command-action@v1
- # with:
- # gradle-version: 7.3.3
- - name: Flutter action
- uses: subosito/flutter-action@v1.5.3
- with:
- channel: "stable"
- flutter-version: "2.5.2"
- - 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: Build exe
- if: ${{ runner.os == 'Windows'}}
- run: |
- flutter config --enable-windows-desktop
- flutter build windows
-
- # - name: Build linux
- # if: ${{ runner.os == 'Linux'}}
- # run: |
- # apt-get install g++
- # flutter config --enable-linux-desktop
- # flutter build linux
- # 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/
|