I am relatively new to the github api and I am struggling to get the latest tag of a given repo.
Q: Why I need that ?
A:
You can get the latest release at https://api.github.com/repos/$org/$repo/releases/latest
https://api.github.com/repos/$org/$repo/releases/latest
If you want just the tag name, you can try something like this:
curl https://api.github.com/repos/$org/$repo/releases/latest -s | jq .name -r