iOS Build Number and Version from Git Tag

Brand new to Bitrise and CI. My goal is to trigger build and release to App Store Connect when I tag a build in my repo. I have the triggering working as expected. What I want to know is if it’s possible to extract a version and build number from the BITRISE_GIT_TAG env var.
I want to tag a commit on GH with DEV v1.0.3-22 and then run a workflow with Set Xcode Project Build Number step where I set the Build Number to 22 and Version Number to 1.0.3. This mirrors our CI/CD processes on our backend.

How could I go about doing this?

The way I ended up handling this issue was to add a custom script step to my workflow with the following:

#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x

# write your script here

if [ ! -z  "$tag" ] ; then 
    echo $tag


    if [[ $tag =~ $pattern ]]; then 
    else echo 'App Version not found'; 


    envman add --key app_build_number --value "$build_number"
    envman add --key app_version --value "$app_version"

It feels a bit hacky, but it seems to be working reliably.