When using a link to releases/latest on Github, Github will redirect to the release page of the latest available release.
The plugin install and theme install commands should recognize such redirects and properly support extracting the ZIP files out of them. Otherwise, you always have to hardcode a version number into the installation link.