name: "tag"

on:
  workflow_dispatch:

jobs:
  tag:
    name: "Tag"
    runs-on: "ubuntu-latest"

    steps:
      - uses: actions/checkout@v2

      - name: Get branch
        run: |
          BRANCH=${GITHUB_REF#refs/*/}
          SANITIZED=$(echo "$BRANCH" | sed -e 's/[^a-zA-Z0-9-]/-/g')
          echo "BRANCH=$SANITIZED" >> $GITHUB_ENV
      - name: Bump version and push tag
        id: tag_version
        uses: mathieudutour/github-tag-action@v5.5
        with:
          append_to_pre_release_tag: ${{ env.BRANCH }}
          github_token: ${{ secrets.PERSONAL_TOKEN }}
