name: Bump Tags to master

on:
  workflow_dispatch:

jobs:
  bump-tags:
    runs-on: blacksmith
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Update v1, v1.0.0-beta tags
        run: |
          git config user.name github-actions[bot]
          git config user.email github-actions[bot]@users.noreply.github.com
          git tag -fa v1 -m "Update v1 tag to latest commit on master"
          git tag -fa v1.0.0-beta -m "Update v1.0.0-beta tag to latest commit on master"
          git push origin v1 v1.0.0-beta --force
