Add validation workflow and main installer script for GitHub releases

This commit is contained in:
2026-03-26 14:40:08 +01:00
commit b161511776
3 changed files with 583 additions and 0 deletions

47
README.md Normal file
View File

@@ -0,0 +1,47 @@
# Github Release Installer Bash Script
The `github-release-installer` is a bash script that allows you to easily download and install assets from GitHub releases. It supports various options for customizing the installation process, such as specifying the release version, filtering assets by name, and performing dry runs.
## Usage
Run the script with a GitHub repository in `owner/repo` format:
```bash
./github-release-installer [options] "owner/repo"
```
Examples:
```bash
# Install latest matching release asset for the current OS/arch
./github-release-installer cli/cli
# Preview what would be selected without downloading/installing
./github-release-installer --dry-run cli/cli
# List downloadable assets from the latest release
./github-release-installer --list cli/cli
# Install using explicit app and binary names
./github-release-installer --app-name "GitHub CLI" --binary-name gh cli/cli
# Download a specific asset file to a directory (no install)
./github-release-installer --file-name gh_2.70.0_macOS_arm64.zip --output-directory /tmp cli/cli
```
Useful options:
- `--dry-run [level]`: test mode, print what would happen.
- `--list`: print release asset URLs.
- `--file-name <name>`: choose an exact asset name.
- `--type <archive|package|zip|tar.gz|tgz|deb|pkg|rpm>`: filter by asset type.
- `--binary-name <src[:dest]>`: install binary using optional destination name.
- `--output-directory <dir>`: download only, do not install.
- `--releases-json`: download latest release metadata as JSON.
For full help:
```bash
./github-release-installer --help
```