Skip to content

bixat/flutter_ci_cd

Repository files navigation

CI Dev Bump app version based on PR labels Deploy Android & Web Promote Google Play build from track to another Deploy web & android for testing Deploy web & Promote Android to production

Flutter CI CD & Branching Template

CI/CD, Branching & (optional VVR Architecture) template for flutter apps.

VVR : ViewModel View Request based on MVCRocket Package

Supported Platforms : Android & web

WIP : Windows, Linux, Mac, & IOS

REPO WORKFLOW

alt text

TODO

  • Bump version based on labels when label PR on dev branch
  • Create tag based on current version
  • Analyze & Test Dev branch PR
  • Bump build (Version code) when merge PR on staging branch
  • Deploy Android to play store on testing track based on labels (default alpha)
  • Deploy Web for testing
  • Deploy IOS on Testflight for Testing
  • Notify Testers (slack, telegram...)
  • Promote Android to production when merge PR on stable branch
  • Promote IOS to production when merge PR on stable branch
  • Deploy Web to production when merge PR on stable branch
  • Upload desktop version on release assets (windows, linux & mac)
  • Create release & generate release notes based on PR's when merge PR on stable
  • Notify Users (slack, telegram...)
  • Manually Workflows for deploy & promote build

HOW TO USE

  1. Click to Use this template button & check Include all branches
  2. Add follow keys to https://github.com/username/repo/settings/secrets/actions replace username & repo :
    • PLAY_STORE_UPLOAD_KEY : Past your keystore file encode64 you can use this for encode file
    • REPO_TOKEN : Follow steps
    • KEYSTORE_STORE_PASSWORD : storePassword from key.properties file
    • KEYSTORE_KEY_PASSWORD : keyPassword from key.properties file
    • KEYSTORE_KEY_ALIAS : keyAlias from key.properties file
    • GCP_SA_KEY : normal service account key(json format) or a base64 encoded service account key with the needed permissions for what you are trying to deploy/update. If you're deploying functions, you would also need the Cloud Functions Developer role, and the Cloud Scheduler Admin for scheduled functions. Since the deploy service account is using the App Engine default service account in the deploy process, it also needs the Service Account User role. If you're only doing Hosting, Firebase Hosting Admin is enough. https://firebase.google.com/docs/hosting/github-integrationPLAY_STORE_CONFIG_JSON: follow steps
  3. Create required labels :
    • for sub branches (feature, enhance, fix) branches create major, minor & patch labels as part of version
    • for staging branch we need alpha, beta & internal labels as tracks
  4. Make sure you follow the workflow in the image Particular how you merge your PR.

RESSOURCES & TOOLS

⚙️ Feel free to add 💡 idea or 🖥 contribute 😊