Docker compose tag image with bumped version number on build

Is there a way to generate and bump tag/version number of an image upon docker compose build?
I’m building the image with this in docker-compose.yml:

build:
  context: /mnt/c/dev/apps/MyApp
  dockerfile: /mnt/c/dev/apps/MyApp/Dockerfile