Package Publish (Promote to Release)
When you create a package version, it’s created as beta and they can only be installed in dev and sandbox orgs. This is a feature in Salesforce so that clients can design governance around packages, and have them approved and tested before they can be installed on environments, where your customer data is.
As a result, if you want to install it in a prod org, you need to promote it to be able to release it. To be able to do this, you must create the package version with the Code Coverage checkbox field flagged, as code validation is required even if it does not have any apex included in the package. Also, the package needs to run with metadata validations, so do not check the Skip Validation checkbox, if you want to promote the package version.
Once you have your package version created with the correct parameters, you can promote a version to released in Copado by using the Publish Package Version action. To do so, follow these steps:
- Package Object and Field access, e.g., assign Copado User permission set.
- Copado Job Engine & Functions, e.g., assign the Copado Functions and Copado Job Engine permission sets.
- Enable Package Publish custom permission, e.g., assign the CMC SFDX Admin permission set.
- In the AppLauncher, go to the Package tab and select the package you are working on. Navigate to the child package version, which needs to be published.
- In the upper-right corner of the page, click on the Publish Package Version button.
- A toast message in green color will appear indicating that the Job Started. Please refresh the page. In the background, a job that launches a function is executed to publish the package.
- Refresh the page. After this, you’ll see that the Is released checkbox in the Package Version Details section is flagged. If you want to deploy the package to different orgs, you can use the Distribute Package operation.