main.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - name: Setup Java JDK
  13. uses: actions/setup-java@v2
  14. with:
  15. distribution: 'adopt'
  16. java-version: "8.x"
  17. - name: Flutter action
  18. uses: subosito/flutter-action@v1.5.0
  19. with:
  20. channel: "stable"
  21. flutter-version: "2.0.2"
  22. - name: Cache Dependencies
  23. id: cache
  24. uses: actions/cache@v1
  25. with:
  26. path: node_modules
  27. key: ${{runner.OS}}-npm-caches-${{ hashFiles('pubspec.lock') }}
  28. - name: Install Dependencies
  29. if: steps.cache.outputs.cache-hit != 'true'
  30. run: flutter pub get
  31. - run: flutter build apk --release
  32. # output some file:
  33. - name: artifact
  34. uses: actions/upload-artifact@v1
  35. with:
  36. name: chat-app-ui
  37. path: build/app/outputs
  38. # # Release
  39. # - name: Release apk
  40. # uses: ncipollo/release-action@v1.5.0
  41. # with:
  42. # artifacts: "build/app/outputs/apk/release/*.apk"
  43. # token: ${{ secrets.GITHUB_RElEASE_TOKEN }}