Download package from GitHub release

tomoyk

Tomoyuki KOYAMA

Posted on October 21, 2024

Download package from GitHub release

This article describes the method for package download from GitHub release by CLI.

Prerequisite

  • GitHub CLI
  • unzip command

Steps

# Get the package which is named 'my_package'
PKG_NAME=$(gh release list --limit 100 --order desc --json tagName --jq '[ .[] | select(.tagName | startswith("my_package")) ] | .[0].tagName')

# Download the package
gh release download "$PKG_NAME" --pattern '*.zip' --output "${PKG_NAME}.zip"

# Unpack
unzip "${PKG_NAME}.zip"
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
tomoyk
Tomoyuki KOYAMA

Posted on October 21, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related