Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rms1000watt/d0e991b22b4886feb0e9e36d05588e7a to your computer and use it in GitHub Desktop.
Save rms1000watt/d0e991b22b4886feb0e9e36d05588e7a to your computer and use it in GitHub Desktop.
cURL File from Release in Github
#!/usr/bin/env bash
download_url=$(curl -s -H "Authorization: token ${GITHUB_ACCESS_TOKEN}" "https://api.github.com/repos/${GH_OWNER}/${GH_REPO}/releases/tags/v1.0.0" | jq '.assets[] | select( .name == "bin-name-v1.0.0-darwin-amd64")' | jq -r ".url")
curl -Lo ssm-env -H "Authorization: token ${GITHUB_ACCESS_TOKEN}" -H "Accept: application/octet-stream" "${download_url}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment