Skip to content
Latchkey

gh release view: Inspect a Release in CI

gh release view displays a single release including its notes, tag, and attached assets.

Before downloading or promoting a release, gh release view confirms the tag, asset names, and draft state a job depends on.

What it does

gh release view shows one release by tag, or the latest release when no tag is given. Output includes the title, notes, publish date, and the list of attached asset names, which is handy for building a download --pattern.

Common usage

Terminal
gh release view
gh release view v1.2.0
gh release view v1.2.0 --json assets --jq '.assets[].name'
gh release view --web

Flags

FlagWhat it does
--json <fields>Output release data as JSON fields
-q, --jq <expression>Filter JSON output with jq
-t, --template <string>Format JSON with a Go template
-w, --webOpen the release in a browser
-R, --repo <owner/repo>Target a specific repository

In CI

Set GH_TOKEN and permissions: { contents: read }. Use --json assets to enumerate exact asset filenames before a gh release download, avoiding pattern misses. The latest-release default skips drafts and prereleases.

Common errors in CI

"release not found" means the tag does not exist or the token cannot see a draft. "gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN environment variable" means GH_TOKEN is missing. With no tag and no published release, view reports the repository has no releases.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →