I have a flutter project and am trying to automate using github actions. I want to create the apk as soon as I create a new tag and save the apk to it. Can someone help me?

on : push
name: build and test app
jobs:
  build:
    name: install dependencies
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]

    - name: install dependencies
      uses: steebchen/[email protected]
      with:
        args: pub get

 #   - name: run tests
  #    uses: steebchen/[email protected]
   #   with:
    #    args: test

    - name: build apk
      uses: steebchen/[email protected]
      with:
        args: build apk --release

#- uses: actions/[email protected]

    - uses: actions/[email protected]
      with:
        name: app-release.apk
        path: build/app/outputs/apk/release/

    - run: cat build/app/outputs/apk/release/

I can build it, but I can't download the artifact

enter image description here


Solution 1: Ricardo Markiewicz

To use --release to have to set up the key store and signingConfigs on android. That was done? I've and app setup with Actions and kind-of-work (it fails because the app is using flutter dev channel and the image of actions use stable).

Try first using 'build apk --debug'

Also, use ls to look into a directory:

    - run: ls android/build/app/outputs/apk/release/