name: 'Setup BRANCH'
description: 'Make BRANCH var accessible to job'
runs:
  using: "composite"
  steps:
    - name: Setup BRANCH
      shell: bash
      run: |
        case ${GITHUB_EVENT_NAME} in
          pull_request)
            BRANCH=${GITHUB_HEAD_REF}
            ;;
          push | release)
            BRANCH=${GITHUB_REF##*/}
            ;;
        esac
        echo "we are on branch=${BRANCH}"
        echo "BRANCH=${BRANCH}" >> ${GITHUB_ENV}
