|
@@ -1,12 +1,15 @@
|
|
|
name: CI
|
|
|
on:
|
|
|
push:
|
|
|
- branches: [ master ]
|
|
|
+ branches: [ master , main]
|
|
|
pull_request:
|
|
|
- branches: [ master ]
|
|
|
+ branches: [ master , main]
|
|
|
jobs:
|
|
|
build:
|
|
|
- runs-on: ubuntu-latest
|
|
|
+ strategy:
|
|
|
+ matrix:
|
|
|
+ os: [ubuntu-latest, macos-latest]
|
|
|
+ runs-on: ${{matrix.os}}
|
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
@@ -15,36 +18,91 @@ jobs:
|
|
|
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.0
|
|
|
+ uses: subosito/flutter-action@v1.5.3
|
|
|
with:
|
|
|
channel: "stable"
|
|
|
- flutter-version: "2.0.2"
|
|
|
+ flutter-version: "2.0.5"
|
|
|
|
|
|
- name: Cache Dependencies
|
|
|
id: cache
|
|
|
- uses: actions/cache@v1
|
|
|
+ uses: actions/cache@v2
|
|
|
with:
|
|
|
- path: node_modules
|
|
|
- key: ${{runner.OS}}-npm-caches-${{ hashFiles('pubspec.lock') }}
|
|
|
+ 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
|
|
|
|
|
|
- - run: flutter build apk --release
|
|
|
+ - name: Build apk
|
|
|
+ if: ${{ runner.os == 'Linux' }}
|
|
|
+ run: flutter build apk --debug --split-per-abi
|
|
|
+
|
|
|
+ - name: Build ios
|
|
|
+ if: ${{ runner.os == 'macOS' }}
|
|
|
+ run: |
|
|
|
+ sudo xcode-select -s /Applications/Xcode_12.3.app
|
|
|
+ flutter build ios --release --no-codesign
|
|
|
+ cd build/ios/iphoneos
|
|
|
+ mkdir Payload
|
|
|
+ cd Payload
|
|
|
+ ln -s ../Runner.app
|
|
|
+ cd ..
|
|
|
+ zip -r app.ipa Payload
|
|
|
+
|
|
|
+ # - name: Build Web
|
|
|
+ # run: |
|
|
|
+ # flutter build web
|
|
|
+ # cd build/web
|
|
|
+ # zip -r web-app.zip .
|
|
|
|
|
|
# output some file:
|
|
|
- name: artifact
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
+ uses: actions/upload-artifact@v2
|
|
|
with:
|
|
|
- name: chat-app-ui
|
|
|
- path: build/app/outputs
|
|
|
+ name: ${{runner.OS}}-artifact
|
|
|
+ path: |
|
|
|
+ build/app/outputs/flutter-apk/**/*.apk
|
|
|
+ build/ios/**/*.ipa
|
|
|
+
|
|
|
+
|
|
|
+ # - name: Deploy iOS Beta to TestFlight via Fastlane
|
|
|
+ # uses: maierj/fastlane-action@v2.0.1
|
|
|
+ # with:
|
|
|
+ # lane: beta
|
|
|
+ # subdirectory: ios
|
|
|
+ # env:
|
|
|
+ # APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
|
|
|
+ # DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}'
|
|
|
+ # DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}'
|
|
|
+ # DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}'
|
|
|
+ # FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}'
|
|
|
+ # FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
|
|
|
+ # MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
|
|
|
+ # GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
|
|
|
+ # PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}'
|
|
|
+ # TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
|
|
|
+ # TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
|
|
|
|
|
|
- # # Release
|
|
|
- # - name: Release apk
|
|
|
- # uses: ncipollo/release-action@v1.5.0
|
|
|
+ # - name: Release Apps
|
|
|
+ # uses: ncipollo/release-action@v1
|
|
|
# with:
|
|
|
- # artifacts: "build/app/outputs/apk/release/*.apk"
|
|
|
- # token: ${{ secrets.GITHUB_RElEASE_TOKEN }}
|
|
|
+ # tag: ${{ env.APP_VERSION }}
|
|
|
+ # name: ${{ env.APP_VERSION }}
|
|
|
+ # token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ # artifacts: 'build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa,build/web/web-app.zip'
|