2
0

publish 403 B

123456789101112131415
  1. #!/usr/bin/env bash
  2. # Get the latest Git tag
  3. latest_tag=$(git tag --sort=committerdate | grep -E '^github-v[0-9]+\.[0-9]+\.[0-9]+$' | tail -1)
  4. if [ -z "$latest_tag" ]; then
  5. echo "No tags found"
  6. exit 1
  7. fi
  8. echo "Latest tag: $latest_tag"
  9. # Update latest tag
  10. git tag -d latest
  11. git push origin :refs/tags/latest
  12. git tag -a latest $latest_tag -m "Update latest to $latest_tag"
  13. git push origin latest