Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Get Ready to Release Your Managed Package

Learning Objectives

  • Create and test a beta version of your package.
  • Explain the concept of release notes for package releases.
  • Upload and install your package.

The process of creating a release of a managed package and making it available for installation to other orgs is called “uploading” the release. Uploading a final production release should be done with some care, because there are certain changes that can’t be made to a component once it is included in a production release. So it’s best to test by making a beta release first. Beta releases can be installed only into Developer Edition orgs and sandboxes. They can’t be upgraded, but they make it possible to test installing a package without permanently locking in any changes in the package.

Tasha has never worked with creating a managed package before so she’s not sure how packaging the project might impact its functionality. By creating a beta version, the whole team can easily create scratch orgs with the beta version installed to test the project as a package.

Upload First Beta Version

Before uploading a beta release, Tasha needs to make sure the packaging org is up to date with the latest changes to the project. 

Keep up with Tasha and her team as they follow these steps to do this.

Use CumulusCI's ci_master flow to deploy the package into the packaging org:

  1. In GitHub Desktop, open your repository in the VS Code by choosing Repository→Open in Visual Studio Code.
  2. In the Terminal window, enter: cci flow run ci_master --org packaging

The --org packaging piece of the command tells CumulusCI which org to run the flow in.

When the ci_master flow completes, the packaging org is ready to upload a new package version. First, verify the components included in the package by following these steps:

  1. In GitHub Desktop, open your repository in the VS Code by choosing Repository→Open in Visual Studio Code.
  2. In the Terminal window, enter: cci org browser packaging
  3. Your org should open in a new browser window. In Salesforce, go to Setup.
  4. Search for Package Manager.
  5. Click on the name of the package, Food-Bank.
  6. Review the metadata to make sure it includes your new objects, fields, and page layouts.

The new Food-Bank app in Salesforce including a list of all the custom components that are included in the application.

Once you’re confident the release contains the right components, run the release_beta flow. This automates the process of uploading a new beta managed package version, and it also publishes the new version to the Github repository under Releases. In the VS Code Terminal, enter: cci flow run release_beta --org packaging

Testing the Beta Version

After creating the beta version, Tasha needs to test it in a fresh scratch org. The ci_beta flow is designed to install the latest beta version and run Apex Tests. In this case, the package doesn’t yet contain any Apex Tests but there's still value in knowing the beta can be successfully installed into a new org. 

Follow along as Tasha and her team complete these steps.

In the VS Code Terminal, enter: cci flow run ci_beta --org beta

While this flow runs, you may see an error stating "InstalledPackage version number does not exist". This error can be ignored—there is a delay before a new package release can be installed—but CumulusCI handles that by waiting for a bit and then retrying.

Once the ci_beta flow completes successfully, delete the beta scratch org so it no longer counts against the Active Scratch Orgs limit in the Dev Hub.  In the VS Code Terminal, enter: cci org scratch_delete beta

Upload the final release

If the beta package version looks good, Tasha can upload a final version of the package using the release_production flow. 

Follow along as Tasha and her team complete these steps.

In the VS Code Terminal, enter: cci flow run release_production --org packaging

Review Release Notes

Now that the final release has been published, Tasha takes a look at the automatically generated release notes on GitHub. The release notes summarize all the changes that were made to the package since the last release. People using the app will have one place to read about all of the latest features and bug fixes.

Follow along as Tasha and her team complete these steps. 

  1. In GitHub Desktop, open your repository in GitHub by choosing Repository→View on GitHub.
  2. Click on the tab that says “2 releases”.

GitHub and CumulusCI automatically aggregate all of the information in the Pull Requests that were part of this release cycle. In the Changes section you see the description you added on the Pull Request, and in the Issues Closed section you see the Issue you created and closed by creating the Deliveries configuration.

Install the Package

Tasha tests out the new package by installing it in her sandbox, and this is what you'll do when you are working in your own sandbox.

Note

You won't complete these steps in your sandbox for the Hands-On Challenge in this module, because sandboxes aren't supported in Trailhead. You will use your Trailhead Playground. After you’ve read through these steps, continue to the Hands-On Challenge below and follow the instructions using your Trailhead Playground.

  1. Tasha connects CumulusCI to her sandbox by typing this command: cci org connect sandbox --sandbox
  2. This will open the Salesforce login page, https://test.salesforce.com. She enters the username and password for her sandbox and finishes logging in.
  3. Tasha clicks the Allow button to authorize CumulusCI to connect to her org.
  4. She sees a blank page with the message “Congratulations! Your authentication succeeded.”
  5. Tasha returns to the VS Code Terminal, and installs the final release of her package into the sandbox by running: cci flow run install_prod --org sandbox
  6. When the installation is done, Tasha opens her sandbox in her web browser to make sure her customizations were configured properly with this command: cci org browser sandbox

Tasha takes a look in her sandbox and sees the new Food Bank app customizations. After thoroughly testing them with her existing configuration, she’ll be ready to install the new package in her production org.

Resources

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기