This project uses FVM to control Flutter version.
To install FVM:
dart pub global activate fvm
To use the correct flutter version:
fvm use
For deployment to Android and iOS, this app uses fastlane which requires Ruby to be installed.
This project uses RVM to control Ruby version. To isntall RVM:
- macOS or Linux: Follow official documentation
- Windows: If official documentation doesn't work, try following this Gist
Github actions run on linux system, so it's important to make sure x86_64-linux
platfor is supported by running:
bundle lock --add-platform x86_64-linux
You can upgrade app version and build number automatically by running:
sh create-release.sh
The script determines the new version using git conventional commits as:
BREAKING CHANGE
: increase major versionfeat
: increase minor versionfix
andperf
: increase patch version
Build number is always increased automatically.
The script will:
- Update
pubspec.yaml
version - Update
CHANGELOG.md
- Add fastlane android change log
- Commit to git
- Create a new tag with the version number
Resources used for creating deployment pipeline:
Secret files needed:
upload-keystore.jks
key.properties
play_config.json
To manually deploy the application:
gem install fastlane -NV
- Go to
/android
foldercd ./android
- Add secret files:
play_config.json
upload-keystore.jks
key.properties
- Publish to Google Play
-
To publish to internal testing:
fastlane internal
-
To publish to alpha testing:
fastlane alpha
-
To publish to prodcution:
fastlane production
Automatic deployment is just running fastlane
deployment commands on Github actions.
- Pre-release:
- On
master
branch - Create a development build
- Release on Github as "Pre-release"
- Automatically create
latest
tag
- On
- Tagged Release
- On
v*
tags - Release on Github
- Release on Alpha track on Play Store
- On
- Production Release
- Dispatched manually
- Release on production track on Play Store
- Promote Alpha to Production
- For each of the secret files:
play_config.json
upload-keystore.jks
key.properties
create a base64 version of them using:
base64 -i play_config.json > play_config.json.b64
or by running:
sh generate-secrets.sh
-
Add each file content to its corresponding repository secret in Github:
PLAY_CONFIG_JSON
UPLOAD_KEYSTORE_KJS
KEY_PROPERTIES