Release a First-Generation Managed Package#
This section outlines how to release first-generation (1GP) Salesforce managed package projects. Salesforce.org’s Release Engineering team practices CumulusCI Flow, which incorporates all of these steps.
This section assumes:
CumulusCI is installed on your computer.
A Salesforce managed package project has been configured for use with CumulusCI.
A packaging org is connected to CumulusCI under the name of
To verify this setup and display information about the connected packaging org:
$ cci org info packaging
The packaging org can be listed under an alias. For a complete list of
orgs connected to CumulusCI, run
cci org list.
If your project has been configured for use with CumulusCI,
cci org info lists the project’s namespace under
in the output.
Deploy to a Packaging Org#
CumulusCI deploys metadata to a
packaging org with the
ci_master flow runs the
which deletes any metadata from the package in the target org that’s
not in the repository.
$ cci flow run ci_master --org packaging
ci_master flow executes these tasks in the target org.
Updates any project dependencies
Deploys any unpackaged metadata located in the
Deploys packaged metadata
Deploys destructive changes to remove metadata in the target org that is no longer in the local repository
config_packagingflow, which by default consists only of the update_admin_profile task.
To list each step in the
ci_master flow, run
cci flow info ci_master.
CumulusCI separates uploading metadata to the packaging org and
releasing a beta version of the package into the
release_beta flows, respectively. This separation offers discretion to
run additional checks against the org, if necessary, between deploy and
Create a Beta Version#
release_beta flow groups the common tasks that must be executed
for the release of a new beta version of a project.
$ cci flow run release_beta --org packaging
This flow always runs against the project’s
packaging org, where
Uploads a new beta version of the managed package.
Creates a new GitHub release tag for the new beta version. Extension packages that also use CumulusCI require this release tag to find the latest version when this repository is listed as a dependency.
Syncs feature branches with the
mainbranch, which automatically integrates the latest changes from
main. For more information see Auto Merging.
This flow assumes that the package contents were already deployed using
ci_master flow. It does not include a step to deploy them.
To create a new beta version for your project without the bells and
whistles, use the
$ cci task run upload_beta --org packaging --name package_version
Test a Beta Version#
ci_beta flow installs the latest beta version of the project in a
scratch org, and runs Apex tests against it.
$ cci flow run ci_beta --org beta
This flow is intended to be run whenever a beta release is created.
Upload and Test a Final Version#
To upload a production release of your managed package project:
$ cci flow run release_production --org packaging
release_beta, this task uploads a new production version of
your package, creates a release tag in GitHub, and aggregates release
notes for the new version.
This flow assumes that the package contents have previously been
deployed using the
To upload the new production version without creating the GitHub tag and generating release notes:
$ cci task run upload_production --name v1.2.1
To test the new package version:
$ cci flow run ci_release --org release
ci_release flow installs the latest production release version,
and runs the Apex tests from the managed package on a scratch org.