-
Open Android project template and use it to create new repository. Preferred repo name is [productname]-android, where [productname] includes only name of the product, without client name.
-
Change following in newly created repository:
- Update Readme.md
- Change project name to real project name
- Change applicationId
- Change packages from
com.thefuntasty.androidprojecttemplate
to real packages based on applicationId
-
Create
develop
branch and set it as a default branch. -
Disable Wiki, Issues, Projects features we do not use.
-
Enable Automatically delete head branches so there is no need to delete branches manually after each PR merge.
-
Add branch ruleset
develop|main
- set targets as shown in the following screenshot:
- Set required approvals
- Set status checks
(NOTE: Status checks (GitHub Actions, Danger, etc.) become visible after first created pull request. Do not forget to set them afterwards.
- Create new branch
feature/PROJ-1-setup-project
where everything will be set up in next steps.
-
Create new Firebase project or get access to an existing one from the client.
-
Create android apps for all build types - usually Debug, Enterprise and Prod
- Make sure to set the package name correctly and add SHA certificate hashes
-
Select enterprise project and click on
Get started
button. -
Add Tester groups
Futured QA
andDevs
. Create invite link and send it to the Slack channel. -
There are two ways of authorizing upload to Firebase.
- Service account json, which is a preferred way
- Create service account in Google Cloud Console
- Select Firebase Products -> Firebase App Distribution Admin role (for this you need additional permissions, so either request them or let someone create the service account)
- Create new key with type
JSON
- Create new repository secret
APP_DISTRIBUTION_SERVICE_ACCOUNT
with the json content
- Using
FIREBASE_TOKEN
, which can be generated using Firebase CLI
- Service account json, which is a preferred way
Make sure that you have enabled google services plugin, otherwise the plugin won't know the id of the app
-
If you created a new project using Android project template, the GitHub Actions workflow files are already present in your repository under
.github/workflows
folder. If not, copy them over from here). -
In Settings tab of your repository, go to Secrets and configure following secrets:
DANGER_GITHUB_API_TOKEN
SLACK_WEB_HOOK
APP_DISTRIBUTION_SERVICE_ACCOUNT
-
For each workflow configuration file, configure the environment variables marked with
TODO
comment:SLACK_CHANNEL
APP_DISTRIBUTION_GROUPS
-
Make a pull request from
feature/PROJ-1-setup-project
todevelop
to ensure that GitHub Actions work properly