Release a Second-Generation Managed Package

Each new second-generation managed package version is marked as beta when created. As you develop your package, you may create several package versions before you create a version that is ready to be released and distributed. Only released package versions can be listed on AppExchange and installed in customer orgs.

Before you promote the package version, ensure that the user permission, Promote a package version to released, is enabled in the Dev Hub org associated with the package. Consider creating a permission set with this user permission, and then assign the permission set to the appropriate user profiles.

When you’re ready to release, use sf package version promote.

1sf package version promote --package "Expense Manager@1.3.0-7"

If the command is successful, a confirmation message appears.

1Successfully promoted the package version, ID: 04tB0000000719qIAA to released.

After the update succeeds, view the package details.

1sf package version report --package "Expense Manager@1.3.0.7"

Confirm that the value of the Released property is true.

1=== Package Version
2NAME                            VALUE
3──────────────────────────────  ───────────────────
4Name                            ver 1.0
5Alias                           Expense Manager-1.0.0.5
6Package Version Id              05iB0000000CaahIAC
7Package Id                      0HoB0000000CabmKAC
8Subscriber Package Version Id   04tB0000000NPbBIAW
9Version                         1.0.0.5
10Description                     update version
11Branch
12Tag                             git commit id 08dcfsdf
13Released                        true
14Created Date                    2021-05-08 09:48
15Installation URL
16https://login.salesforce.com/packaging/installPackage.apexp?p0=04tB0000000NPbBIAW

You can promote and release only one time for each package version number, and you can’t undo this change.