Skip to content

CICD-142 · Publish a local archive to an existing GitHub Release ​

Encyclopedia · Registries and releases · All snippets

Previous · CICD-141 · Next · CICD-143

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites authorized test registry, scoped credentials and candidate artifact.
  • Platforms github-actions, github-cli.
  • Parameters RELEASE_TAG, TARGET_REPO.

2. Copy the snippet ​

bash
gh release upload "${RELEASE_TAG:?}" dist/app.tar.gz --repo "${TARGET_REPO:?}"

3. How it works ​

The CLI attaches built assets to an existing release. The selected repository, tag and asset names scope the operation. The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.

4. Verify the result ​

Use approved selected repo and tag. Existing asset names should fail rather than overwrite.

Validation syntax-validated (Bash parse). Status definitions.