gh api repos/owner/repo/releases/latest --jq .tag_name

Category: GitHub CLI

gh api repos/owner/repo/releases/latest --jq .tag_name

Get the latest release tag via API

Hits the latest-release endpoint and prints the tag name, handy for CI that must fetch the newest version. The endpoint ignores prereleases. Compare with gh release list --limit 1 for tag plus metadata.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.