* Publishes the given packages to the registry and makes the releases * available on GitHub. * * @param builtPackagesWithInfo List of built packages that will be published. * @param releaseNotes The release notes for the version being published. * @param beforeStagingSha Commit SHA th
(
builtPackagesWithInfo: BuiltPackageWithInfo[],
releaseNotes: ReleaseNotes,
beforeStagingSha: string,
publishBranch: string,
npmDistTag: NpmDistTag,
additionalOptions: {showAsLatestOnGitHub: boolean},
)
| 738 | /** |
| 739 | * Publishes the given packages to the registry and makes the releases |
| 740 | * available on GitHub. |
| 741 | * |
| 742 | * @param builtPackagesWithInfo List of built packages that will be published. |
| 743 | * @param releaseNotes The release notes for the version being published. |
| 744 | * @param beforeStagingSha Commit SHA that is expected to be the most recent one after |
| 745 | * the actual version bump commit. This exists to ensure that caretakers do not land |
| 746 | * additional changes after the release output has been built locally. |
| 747 | * @param publishBranch Name of the branch that contains the new version. |
| 748 | * @param npmDistTag NPM dist tag where the version should be published to. |
| 749 | * @param additionalOptions Additional options needed for publishing a release. |
| 750 | */ |
| 751 | protected async publish( |
| 752 | builtPackagesWithInfo: BuiltPackageWithInfo[], |
| 753 | releaseNotes: ReleaseNotes, |
| 754 | beforeStagingSha: string, |
| 755 | publishBranch: string, |
| 756 | npmDistTag: NpmDistTag, |
| 757 | additionalOptions: {showAsLatestOnGitHub: boolean}, |
| 758 | ) { |
| 759 | const releaseSha = await this._getAndValidateLatestCommitForPublishing( |
| 760 | publishBranch, |
| 761 | releaseNotes.version, |
| 762 | beforeStagingSha, |
| 763 | ); |
| 764 | |
| 765 | // Before publishing, we want to ensure that the locally-built packages we |
| 766 | // built in the staging phase have not been modified accidentally. |
| 767 | await assertIntegrityOfBuiltPackages(builtPackagesWithInfo); |
| 768 | |
| 769 | // Create the GitHub release before publishing packages so that release notes and tags |
| 770 | // are in place prior to publishing. |
| 771 | await this._createGithubReleaseForVersion( |
| 772 | releaseNotes, |
| 773 | releaseSha, |
| 774 | npmDistTag === 'next', |
| 775 | additionalOptions.showAsLatestOnGitHub, |
| 776 | ); |
| 777 | |
| 778 | if (this.config.exitGate !== undefined) { |
| 779 | await this._publishBuiltPackagesViaExitGate( |
| 780 | builtPackagesWithInfo, |
| 781 | npmDistTag, |
nothing calls this directly
no test coverage detected