Flutter Github Action Error

90 views
Skip to first unread message

Abada Samuel

unread,
Apr 20, 2020, 11:27:39 AM4/20/20
to Flutter Development (flutter-dev)
I tried setting up a github action workflow file to perform some operations on pull request - build the debug apk of the master branch and the branch making the pull request. The workflow file returns the error:
Error
every step must define a `uses` or `run` key. 

See the workflow below. Any idea how to resolve or my workflow file is wrongly written/formatted?
name: Compare APKs
on:
  pull_request:
    branches: [ master ]
    paths:
      - '.github/workflows/**'
      - 'api/**'
      - 'client/flutter/pubspec.yaml'
      - 'client/flutter/pubspec.lock'
      - 'client/flutter/ios/**'
      - 'client/flutter/android/**'
jobs:
  build-master:
    name: Build Master APK
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - run: git clone https://github.com/flutter/flutter.git --depth 1 -b v1.12.13+hotfix.8 _flutter
      - run: echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin"
      - run: flutter pub get
        working-directory: ./client/flutter
      - name: Build Master APK
      - run:
          futter run
          mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/app-master.apk
        working-directory: ./client/flutter
      - name: Upload APK
      - uses: actions/upload-artifact@v1
        with:
          name: apk
          path: app/build/outputs/apk/debug/app-master.apk
      - run: git diff --exit-code

  build-pr:
    name: Build PR APK
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-java@v1
        with:
          java-version: '12.x'
      - run: git clone https://github.com/flutter/flutter.git --depth 1 -b v1.12.13+hotfix.8 _flutter
      - run: echo "::add-path::$GITHUB_WORKSPACE/_flutter/bin"
      - run: flutter pub get
        working-directory: ./client/flutter
      - name: Build PR APK
      - run:
          futter run
          mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/app-pr.apk
        working-directory: ./client/flutter
      - name: Upload APK
      - uses: actions/upload-artifact@v1
        with:
          name: apk
          path: app/build/outputs/apk/debug/app-pr.apk
      - run: git diff --exit-code

  diffuse:
    needs: [build-master, build-pr]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Download APKs
      - uses: actions/download-artifact@v1
        with:
          name: apk
      - name: Execute Diffuse
      - run: ./diffuse diff apk/app-master.apk apk/app-pr.apk

Abada Samuel

unread,
Apr 20, 2020, 11:28:24 AM4/20/20
to Flutter Development (flutter-dev)
On building the debug apk, it compares both using diffuse

ABADA SAMUEL

unread,
Apr 20, 2020, 11:51:41 AM4/20/20
to Flutter Development (flutter-dev)

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/55261d84-6e80-4f3a-bdbe-b90378b56bc2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages