# Builds and branches

Runway fetches up to two different kinds of builds:

* **Release Candidate** (or RC, sometimes referred to as staging)
* **production** (optional)

{% hint style="info" %}
Runway will *always* fetch RC/staging builds. Runway will *optionally* fetch production builds if app/CI settings are defined such that production builds are different than RC/staging.
{% endhint %}

A build is defined by two things: the **workflow** that produces it, and the **branch** it is built from:

`<workflow> + <branch> = build`

So, in addition to fetching RC/staging builds, Runway will fetch production builds if there’s a distinct workflow for production *or* if a distinct branch is used for production (distinct == different than the branch defined for RC/staging builds).

#### Workflow

Value set in [CI settings](/integrations/ci-cd.md). Runway supports up to two different CI workflows:

* RC/staging workflow (required/primary)
* Release workflow (optional)

#### Branch

Runway assumes all builds are built from the app’s release branch(es), unless optional values are set in [Integration settings](/using-runway/app-settings/integrations-settings.md):

* RC/staging branch override
* Deploy branch override

{% hint style="info" %}

* If an RC/staging branch override value is set, RC/staging builds are fetched using that branch instead of the release branch.
* If a deploy branch override value is set, production builds will be fetched, and they will use that branch.
  {% endhint %}

### Examples

Release branch: `release-branch`

#### 1.

> RC/staging workflow: deploy
>
> Release workflow: (none)
>
> Staging branch override: (none)
>
> Deploy branch override: (none)

RC/staging build = `deploy + release-branch`

Prod build = (none)

#### 2.

> RC/staging workflow: `deploy`
>
> Release workflow: `deploy-prod`
>
> Staging branch override: (none)
>
> Deploy branch override: (none)

Staging build = `deploy + release-branch`

Prod build = `deploy-prod + release-branch`

#### 3.

> RC/staging workflow: `deploy`
>
> Release workflow: (none)
>
> Staging branch override: `itunes-dist`
>
> Deploy branch override: (none)

Staging build = `deploy + itunes-dist`

Prod build = (none)

#### 4.

> RC/staging workflow: `deploy`
>
> Release workflow: (none)
>
> Staging branch override: (none)
>
> Deploy branch override: `itunes-dist`

Staging build = `deploy + release-branch`

Prod build = `deploy + itunes-dist`

#### 5.

> RC/staging workflow: `deploy`
>
> Release workflow: `deploy-prod`
>
> Staging branch override: (none)
>
> Deploy branch override: `itunes-dist`

Staging build = `deploy + release-branch`

Prod build = `deploy-prod + itunes-dist`

#### 6.

> RC/staging workflow: `deploy-rc`
>
> Release workflow: `deploy-prod`
>
> Staging branch override: `development`
>
> Deploy branch override: (none)

Staging build = `deploy-rc + development`

Prod build = `deploy-prod + release-branch`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.runway.team/getting-started/setting-up-your-integrations/builds-and-branches.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
