GitHub Release

View as Markdown

A GitHub Release artifact creates versions from releases in a connected GitHub repository. The version name is the release tag, and the version contains the files attached to the release. A pipeline can download such a version, test it and deploy it.

Artifact versions and synchronization

Each version corresponds to one release, for example v1.1.0. The source code archives that GitHub generates automatically are not in the version.

Sync works one way, from GitHub to Buddy. Versions are read-only in Buddy: adding a version or a file fails with Artifact version is read only. To create a GitHub release from a Buddy pipeline, use the GitHub Release action.

A version has a URL like a version of a Bucket artifact. Dots in the version name are replaced with hyphens in the URL:

https://v1-1-0-my-app-releases-my-workspace.bucket-2.registry.sh

Image loading...GitHub Release artifact versions with pre-releases

Artifact creation

The artifact requires a GitHub integration with access to the repository. In Artifacts, click New artifact, select GitHub Release and set:

  • Scope - Workspace or Project, described in Scopes,
  • Integration, Organization and Repository - the GitHub integration and the repository the releases come from,
  • Include draft releases - enables synchronization of draft releases. Draft release versions do not trigger pipeline execution until the corresponding release is published on GitHub
  • Include pre-releases - whether versions are also created from pre-releases.

After you create the artifact, you set retention rules for versions matching a pattern, for example v*-rc.*, in the Settings tab, in the Retention artifact version pattern field.

Image loading...GitHub Release artifact settings

Buddy does not import releases created before the repository was connected, so connecting it does not start any pipelines.

Release-based pipeline triggers

A new version can start a pipeline with the On artifact event trigger and the version creation event. In YAML:

yaml
events:
- type: CREATE_ARTIFACT_VERSION
  artifacts:
  - identifier: my-app-releases
    scope: WORKSPACE

A run started by a new version has three variables that describe the release:

Variable Value
BUDDY_RUN_ARTIFACT_VERSION Release tag, e.g. v1.1.0-rc.2
BUDDY_RUN_ARTIFACT_VERSION_DRAFT false in automatically triggered runs. true only in runs started manually with a draft release version
BUDDY_RUN_ARTIFACT_VERSION_PRERELEASE true for a GitHub pre-release, false for a stable release

The value of BUDDY_RUN_ARTIFACT_VERSION_PRERELEASE comes from the pre-release flag on GitHub, not from the tag name. A v2.0.0-rc.1 release published without this flag reaches the pipeline as stable.

The Download Artifact Version action downloads the version that started the run:

yaml
- action: Download release
  type: DOWNLOAD_ARTIFACT_VERSION
  artifact: my-app-releases
  version: $BUDDY_RUN_ARTIFACT_VERSION
  destination_path: release/$BUDDY_RUN_ARTIFACT_VERSION
  overwrite: true

The pipeline filesystem persists between runs, so a separate directory for each version keeps the files of different releases apart. The other variables and action conditions are described in Run a pipeline with an artifact version.

Conditional execution based on release type

The BUDDY_RUN_ARTIFACT_VERSION_PRERELEASE variable can be used in trigger conditions to control action execution based on the release type. The following condition restricts action execution to pre-releases:

yaml
trigger_conditions:
- trigger_condition: VAR_IS
  trigger_variable_key: BUDDY_RUN_ARTIFACT_VERSION_PRERELEASE
  trigger_variable_value: "true"

Set trigger_variable_value to "false" to restrict action execution to stable releases. Actions whose trigger conditions are not met are marked as Skipped in the run. For an example of a release-based deployment workflow, see GitHub Release artifacts in Buddy.

Pipeline permissions

Downloading artifact versions requires the pipeline to have at least the Read-only permission level for the artifact. Pipeline permissions are configured on the artifact's Permissions tab. See Permissions and access.

See also:

Last modified on Dec 3, 2026