0

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/checkout@master

    - name: install dependencies
      uses: steebchen/flutter@v1.0.0
      with:
        args: pub get

 #   - name: run tests
  #    uses: steebchen/flutter@v1.0.0
   #   with:
    #    args: test

    - name: build apk
      uses: steebchen/flutter@v1.0.0
      with:
        args: build apk --release

#- uses: actions/checkout@master

    - uses: actions/download-artifact@master
      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

1 Answer 1

1

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/
2
  • I can build it, but I can't download the artifact Nov 21, 2019 at 14:09
  • I think that your problem is you miss the android folder in the apk path. Should be. android/build and no build/ Nov 21, 2019 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.