Skip to content

cedvdb/action-flutter-build-android

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

See also

1. Create an upload keystore

Read the official documentation to setup the keystore: https://docs.flutter.dev/deployment/android#create-an-upload-keystore

If you followed the above documentation you should end up with a local file key.properties (not comitted to github). This github action will recreate that file with values inside github actions secrets, for signing the application.

2. Add secrets values in your repository settings

add the base64 version of your upload-keystore.jks as well as the password from the previous step in your repository actions secrets

base64 -i path/to/upload-keystore.jks

You should end up with those values as secrets (you can give them any name).

secrets

3. Use the action

name: Build and distribute

on:
  push:
    branches:
      - main

jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - uses: cedvdb/action-flutter-build-android@v1
        with:
          keystore-base64: ${{ secrets.ANDROID_RELEASE_KEY }}
          keystore-password: "${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}"
          # optionals
          build-cmd: flutter build apk --release --flavor dev
          working-directory: ./
          
      - name: Archive APK
        uses: actions/upload-artifact@v2
        with:
          name: release-apk
          # Try running the build locally with the build command to be sure of this path
          path: build/app/outputs/flutter-apk/app-dev-release.apk

About

github action to build flutter apps for the android platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published