1name: "Determine tag name"
 2description: "Determine the tag name to use for a release"
 3outputs:
 4  name:
 5    description: "The name of the tag"
 6    value: ${{ steps.tag.outputs.name }}
 7
 8runs:
 9  using: "composite"
10  steps:
11    - name: Determine tag name
12      id: tag
13      shell: bash
14      run: |
15        BUILD_NUMBER="$(git rev-list --count HEAD)"
16        SHORT_HASH="$(git rev-parse --short=7 HEAD)"
17        if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
18          echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
19        else
20          SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
21          echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
22        fi