# Release

Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured, artifacts are fetched from sfp server.

* [`sfp release`](#sfp-release)

## `sfp release`

Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured, artifacts are fetched from sfp server.

```
USAGE
  $ sfp release -o <value> [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-p <value>... | --releasecandidate <value>...] [--scope <value>] [--npmrcpath <value> [--npm | -f
    <value>]] [-g <value>...] [-t <value>] [--replacementsoverride <value>] [--waittime <value>] [--keys <value>] [-d
    <value>] [-b <value> --generatechangelog] [--runtests] [-v <value>] [--loglevel
    trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]

FLAGS
  -b, --branchname=<value>            Repository branch in which the changelog files are located
  -d, --directory=<value>             Relative path to directory to which the changelog should be generated, if the
                                      directory doesnt exist, it will be created
  -e, --email=<value>                 Email address for authenticated user. Ignored if --application-token is provided.
                                      Can be set via SFP_SERVER_USER env var.
  -f, --scriptpath=<value>            (Optional: no-NPM) Path to script that authenticates and downloads artifacts from
                                      the registry
  -g, --logsgroupsymbol=<value>...    Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                      opening group, and an optional closing group symbol.
  -o, --targetorg=<value>             (required) Username or alias of the target org.
  -p, --releasedefinition=<value>...  Path to release definiton yaml, Multiple paths can be seperated by commas
  -t, --application-token=<value>     Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env
                                      var (CLI flags take precedence over env vars).
  -t, --tag=<value>                   Tag the release with a label, useful for identification in metrics
  -v, --devhubalias=<value>           Username or alias of the Dev Hub org.
      --generatechangelog             Create a release changelog
      --keys=<value>                  Keys to be used while installing any managed package dependencies. Required format
                                      is a string of key-value pairs separated by spaces e.g. packageA:pw123
                                      packageB:pw123 packageC:pw123
      --loglevel=<option>             [default: info] logging level for this command invocation
                                      <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --npm                           Enable fallback to external npm registry if artifact is not found in sfp server
      --npmrcpath=<value>             Path to .npmrc file used for authentication to registry. If left blank, defaults
                                      to home directory
      --releasecandidate=<value>...   Release candidate(s) to fetch from the server in format 'domain:releaseName'.
                                      Multiple RCs can be specified via comma separation or multiple flags. Mutually
                                      exclusive with --releasedefinition. Example: 'core:RC-CORE-1' or
                                      'core:RC-1,sales:RC-2'
      --replacementsoverride=<value>  Path to a YAML file containing replacement overrides to apply during deployment
      --repository=<value>            The repository identifier. E.g `owner/repo` for GitHub/GitLab or
                                      `org/project/repo` for Azure DevOps
      --runtests                      Force execution of tests during deployment (tests are skipped by default on
                                      sandbox orgs, but always run on production)
      --scope=<value>                 (required for NPM) User or Organisation scope of the NPM package
      --sfp-server-url=<value>        URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                      config:set server-url
      --waittime=<value>              [default: 120] Wait time for package installation

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Release a set of artifact(s) as defined by a release definition into a target org. When sfp server is configured,
  artifacts are fetched from sfp server.

EXAMPLES
  $ sfp release -p path/to/releasedefinition.yml -u myorg --npm --scope myscope --generatechangelog

  $ sfp release --releasecandidate core:RC-CORE-1 --repository flxbl-io/sf-core -u myorg

  $ sfp release --releasecandidate core:RC-CORE-1,sales:RC-SALES-1 --repository flxbl-io/sf-core -u myorg

  $ sfp release --releasecandidate core:RC-CORE-1 --releasecandidate sales:RC-SALES-1 --repository flxbl-io/sf-core -u myorg
```

*See code:* [*src/commands/release.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# 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.flxbl.io/flxbl/sfp/sfp-community/cli-reference-v51-release-v3/core/release.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.
