main.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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@v1.3.0
  14. with:
  15. java-version: "12.x"
  16. - name: Flutter action
  17. uses: subosito/flutter-action@v1.1.1
  18. with:
  19. channel: "stable"
  20. flutter-version: "1.12.x"
  21. - name: Cache Dependencies
  22. id: cache
  23. uses: actions/cache@v1
  24. with:
  25. path: node_modules
  26. key: ${{runner.OS}}-npm-caches-${{ hashFiles('pubspec.lock') }}
  27. - name: Install Dependencies
  28. if: steps.cache.outputs.cache-hit != 'true'
  29. run: flutter pub get
  30. - run: flutter build apk --release
  31. # output some file:
  32. - name: artifact
  33. uses: actions/upload-artifact@v1
  34. with:
  35. name: chat-app-ui
  36. path: build/app/outputs
  37. # # Release
  38. # - name: Release apk
  39. # uses: ncipollo/release-action@v1.5.0
  40. # with:
  41. # artifacts: "build/app/outputs/apk/release/*.apk"
  42. # token: ${{ secrets.GITHUB_RElEASE_TOKEN }}