How do you setup your build triggers?

I am eager to learn how others approach automating their builds.

I tend to take a Gitflow approach to branching and will initially stick to main and develop branches along with feature branches in a new project before later expanding to staging when necessary.

With this approach I usually setup my CD pipeline to automatically publish a new internal build of our mobile apps to Test Flight and internal test track within Google Play whenever a new release tag has been published e.g. v1.4.2+62.

On some projects I’ve setup triggers for Slack to ensure that the relevant stakeholders can quickly download the latest version of the app.

Recently I’ve been working on the web version of the same app and have been tempted to go with a package_name-version_name-environment approach.

Example

  1. mobile_app-v2.0.0+88-dev - dev release of version 2.0.0+88 of only the mobile app

  2. web_app-v2.1.1+90-dev - dev release of version 2.1.1+90 of only the web app

  3. v2.2.0+104 - prod release of version 2.2.0+104 for both mobile and web app

Is there any drawbacks with this approach?

What approach do you take?