Release a Second-Generation Managed Package
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.
sf package version promote --package "Expense Manager@1.3.0-7"
If the command is successful, a confirmation message appears.
Successfully promoted the package version, ID: 04tB0000000719qIAA to released.
After the update succeeds, view the package details.
sf package version report --package "Expense Manager@1.3.0.7"
Confirm that the value of the Released property is true.
=== Package Version
NAME VALUE
────────────────────────────── ───────────────────
Name ver 1.0
Alias Expense Manager-1.0.0.5
Package Version Id 05iB0000000CaahIAC
Package Id 0HoB0000000CabmKAC
Subscriber Package Version Id 04tB0000000NPbBIAW
Version 1.0.0.5
Description update version
Branch
Tag git commit id 08dcfsdf
Released true
Created Date 2021-05-08 09:48
Installation URL
https://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.